I encountered some issues with thes results from stacked images. Let's imagine I have two images virtually taken at the same time of the same region of sky using the same telescope/filter/camera. But they are not perfectly aligned. When I measure the photometry the same way with the same apperture and annulus using the same comp stars I get the following for the target and the check:
Image 1: Target = 14.441 +/- 0.033, Check = 14.093 +/- 0.032
I do the same with image 2 and get:
Image 2: Target = 14.448 +/- 0.040, Check = 14.100 +/- 0.039
These are consistent and so far I'm happy... but wait.
When I stack (using average) these two images together I get the following with the same apperture and annulus using the same comp stars:
VPHOT Average Stacked: Target = 14.318 +/- 0.030, Check = 14.115 +/- 0.029
This makes no sense and furthermore the sky value which was really similar for the individual images are now significantly smaller in the stacked image.
If I take a step back and combine the same images using IRAF imcobmine with a shift caculated from the WCS, I now get:
IRAF Imcombine: Target = 14.448 +/- 0.076
Which while I'm not thrilled that the error got bigger (and I'm trying to figure that one out independently), at least the value is some what more believable as the average of the two individual images. The sky value measured in the IRAF imcombined image is also more consistent with the sky values measured in the individual images.
I thought that maybe VPHOT is not aligning the images before it stacks them... this might explain the odd behavior. So I dug back through the forum and found a reply from Geir that says the stacking algorithm in VPHOT does "align" the images before stacking them. This just confuses me more.
But my other thought is that the real clue here is in the differences in the sky background. I can't figure out why the sky measures at 721 in the VPHOT combined image but the IRAF imcombined image (877) and the images individually (872 and 878) are all more like 870. And the sky is not a value roughly 100 less for the target in the VPHOT stacked image, all the sky values for the comparisons are also about 100 counts less. This difference in sky probably accounts for the difference in magnitude calculated for the VPHOT stacked image.
I've kind of reached the end of what I can do to diagnose this without seeing the source code so I'm posting this so someone that has access to the code can check it out. I'm happy to share the images I used in my example thought VPHOT if that helps.