Description
Fits a quadratic to the detector response using 3 exposures and dark frames. At present this is primarily a test program, and is not completed to perform actual production runs. The program reads 4 sets of 3 exposures plus dark frames from 9/08/07 and calculates {a, b, c} for y = ax^2 + bx + c fitting the 3 exposures. At present, only one quadratic is calculated fitting the mean of each exposure stack, rather then pixel-by-pixel.
Usage
quadflats.py raw-data-folder
The program takes a single argument: the location of the raw data for 9/08/07 (or no arguments if it happens to be in '09807/raw').
Examples
> quadflats.py /Users/sky/Projects/Python/VenusData/090807/raw dark: mean1 = 7.227067, mean2 = 18.515120, mean3 = 42.905338 422: mean1 = 623.193564, mean2 = 2564.759774, mean3 = 9963.936523 422: min = -142.901587, max = 9921.031185 942: mean1 = 2895.637321, mean2 = 10818.978527, mean3 = 35971.496094 942: min = -1922.302551, max = 35928.590755 1462: mean1 = 2615.845815, mean2 = 10145.250667, mean3 = 34929.968750 1462: min = -1668.133294, max = 34887.063412 2030: mean1 = 2471.854942, mean2 = 9323.951035, mean3 = 32721.347656 2030: min = -1145.716724, max = 32678.442318

Fits are performed for sky frames starting with #422, 942, 1462, and 2030. Dark frames starting at #452 are subtracted from each exposure average before fitting. What is interesting to note about the results is that, while all curves have the same shape, the exposures and fit for images 422+ are less than 1/3 the values of the other 3, even though the exposures and coadds are the same.
I don't know if the quadratic fits will improve the flat-fielding over affine fits. I may come back to this question later this month.
©Sky Coyote 2007