| overflowx | stsdas.hst_calib.foc.focutility | overflowx |
overflowx -- Correct 8-bit overflow in FOC images (as far as possible).
overflowx input1 input2 output
In 8-bit mode, an FOC pixel will overflow---cycling back through 0---when the count exceeds 255. If an image is taken with the same conditions, but with a shorter exposure time, then it can be corrected, assuming that the pixels have cycled through 0 no more than one time. Alternatively, in the special case of flat fields we know that the image should not change too rapidly from one pixel to the next, we can therefore attempt to correct an image with overflowed pixels.
There are two modes of operation. The first uses two images, and checks the ratio of pixel values. If the ratio of overflowed to normal image exceeds low_thresh, then we add 255 to first image, unless this would give too high a ratio. Negative ratios are interpreted as multiple of rms statistics (sqrt(count)).
If only one image is given, we proceed along each line and starting at a specified pixel, if we detect a downward shift by more than low_thresh we add 255, unless we would end up with a positive shift greater than high_thresh.
1. Correct an image as a flat field, one line at a time.
fo> overflowx inimage "" outimage
2. Here the ratio of the non-overflowed to overflowed images should be 0.5. Those pixels for which the ratio is too much lower than this will be corrected, unless an overcorrection would result.
fo> overflowx ov norm out ratio=0.5
This task was written by David Giaretta.
Type "help focutility option=sys" for a higher-level description of the focutility package.