1. Because of detector saturation and readout noise, the edge of the bright limb could not be determined unambiguously.
2. The center of the bright limb circle was not coincident with the center of the dark limb circle. This may be due partly to detector error, but it may also be an intrinsic property of light scattering from the planet (e.g. the bright limb was observed by reflected light, while the dark limb was observed by transmitted light, from cloud layers at different altitudes).
3. Anisotropic distortion of the image by Earth's atmosphere caused the planet outline to be significantly non-circular, in ways that varied from image to image. This issue will be discussed further below.
1. It allows images to be loaded and viewed at any zoom factor, and scrolled to any subset. Display parameters can be individually set for each image.
2. Images can be shifted in realtime by sub-pixel values in both X and Y, and can be registered with respect to a circle of any center and radius.
3. Two images can be automatically animated (swapped) in order to quickly and clearly see registration errors between them. Once registered, they can be written to disk in shifted form.
1. Align the first image (i.e. 1230, also the sharpest) to be centered in the frame at (255, 255). This was done by loading image 1230 into the file 2 position, and then shifting it by typing into the text fields or pressing the buttons until it was centered in a circle located at (255, 255). Used a zoom factor of 2, and a file 2 shift increment of 0.5. Image features used to perform the alignment were the top and bottom cusp of the bright crescent, and the edge of the dark limb.
This, and subsequent alignments, was very much a trial and error subjective process. Attempts to automatically align the dark limb have so far failed, again by just one or two pixels, because they cannot unambiguously distinguish the gray, fuzzy, noisy limb from the gray, fuzzy, noisy background. Neither the limb nor the background maintain a constant brightness along the circumference.
Once this image has been aligned, it was saved to disk. This first step is not critical, but it does provide the reference to which all subsequent images will be aligned.
2. Load the aligned first image into the file 1 position, and load the second image of the same time interval into the file 2 position. It should be noted here that images to be aligned are done so with their Y axis flipped, while already aligned images are viewed unflipped.
Using the automatic coordinates in columns 4 and 5 of the image_data.txt file, perform a rough shift of the second image. Then, using the buttons set to 0.5 pixel increment values, iteratively move the second image until it aligns with the first. You can press the 'Swap' button to see the difference between images, or check the 'Auto swap' box to continuously animate between images as you continue to align.
As with the first image, features used to register the two images include the top and bottom cusps of the bright crescent, and the edge of the dark limb. However, since these two images were acquired at about the same observing time, there should be no perceptible cloud motion between them. Therefore, you can also use any variation in the cloud motion (left-right or up-down), to adjust the registration. Make sure that you are looking at the cloud features themselves, rather than the background noise of the image (e.g. bad pixels, non-flat-field variations in brightness), all of which will also appear to move. When the images are properly aligned, the clouds will not move, although the background noise may continue to do so.
It may not be possible to align the images based on all the aformentioned criteria, due to issues which will be discussed below. Proper alignment of one part of the image may not entail proper alignment of another part of the image. Nevertheless, it should be possible to adequately align overall images to within 0.5 pixel or less. If you use a smaller shift increment, it is suggested that you keep to powers of 2 (e.g. 0.5, 0.25, 0.125, etc..).
When this image is aligned, it is saved to disk.
3. Repeat step 2 for all other images in the current time interval. That is, subsequently align all other images to the first image of the interval, not to the previous image of the interval.
4. Repeat step 2 for the first image of the next time interval. That is, align the first image of the next interval to the aligned first image of the previous interval.
5. Load the aligned first image of the new time interval into the file 1 position and then repeat step 2 for each additional image of the new time interval.
6. Repeat steps 4 and 5 for the first and remaining images of each additional time interval.


Although noise in the images certainly contributes to the poor performance of an automated approach, there are two additional factors, intrinsic to the images themselves, which appear to be at work:
1. The overall quality of images changes from file to file, even over a time period of only a few seconds. The trend in image quality as time progresses is generally downward, but it is not monotonic, and there can be a great variation in the computed and perceived sharpness of images within the same time interval. This variation in sharpness makes it difficult for both human and machine to find and recognize features between images, as their location and geometry can change by a pixel or more. This variation is presumed to be due to changes in the Earth's atmosphere and in the optical system. These changes appear to have timescales ranging from only a few seconds to those lasting the duration of the observing night or morning. It may not be possible to alleviate these non-systematic effects, although an attempt at some kind of semi-blind deconvolution to reverse the effects of unknown but obviously active distortion PSFs may be worthy.
2. The magnification of images changes from file to file, in a non-isotropic fashion with independent X and Y values. This has the effect of distorting the planet disk from a circle of the correct eccentricity, with the consequence that all parts of the image cannot be aligned at the same time. Often a choice must be made whether to align on the top or the bottom cusp --but not both--, or on the limb or the clouds --but not both--, or on the edge or the center of the planet --but not both. It might be possible to restore the symmetry of the disk by performing separate X and Y magnification transformations, using the Fourier transform. Procedurally, this might entail first aligning some part of the cusp, limb, or clouds, and fixing that point between images. Then, by minutely adjusting both the X and Y magnifications while maintaining the aligned point, independently bring other points of the planet first into X alignment, and then into Y alignment. Future versions of FITSRegister may add this feature, so that the alignment process would involve adjusting 4 parameters for DX, DY, MX, and MY between pairs of images.
The steps used to make the flat and mask were:
1. Read in FITS files and clip all negative values to 0.
2. Multiply each image by weighting factor and add together.
3. Compute average value of all non-zero pixels.
4. Compute standard deviation of all non-zero pixels.
5. Set all pixels outside of Z = 0.75 standard deviations of the mean to 0. This limit can be varied as desired, with the effect that more or fewer pixels are rejected. A value of 0.75 was chosen by visual inspection of the resulting mask and its effect on subsequent image processing.
6. Compute new average value of all non-zero pixels.
7. Divide all non-zero pixel values by new average, so that average of image is now = 1.
8. Save logical binary values of flat {0, >0} as mask.
Although the resulting flat looks reasonable, it does not perform well, as will be demonstrated below.
In the process above, the word 'average' can be replaced with 'median' with little effect on the resulting images.
I felt that this composite image needed a bit of tweaking, specifically:
1. It was not properly aligned to a center at (255, 255).
2. It contained some spatially correlated noise which I thought might detract from the overall quality of the processed images.
I therefore aligned the image manualy:
and blurred it slightly with a Gaussian filter of sigma = 2.5 to remove some of the noise: