Bom dia! Tudo bem? Tudo bem!
All right, so now we know all about how to obtain profile-fitting photometry from CCD frames. Unfortunately, there are at least three more very dirty problems, and one rather clean one, that we must deal with before we can publish that photometry.
First, you must recall that our derived magnitudes are strictly relative: they tell us with very good precision (we hope) how much brighter or fainter one star is than another star in the same frame. The zero-point of each frame's magnitude scale is tied to the aperture magnitudes of the PSF stars, as measured through comparatively small synthetic apertures. Because the seeing and guiding will differ from one CCD frame to the next, the amount of light which fell outside that small aperture - and hence didn't get measured, as far as we are concerned - will also differ from one frame to the next; thus, the photometric system of each CCD frame will differ by some additive constant from the system of every other frame. We must therefore correct these relative instrumental magnitudes to some system of absolute instrumental magnitudes which will be consistent from one frame to the next. This is the first dirty problem.
The second dirty problem is the fact that we now have results from several - perhaps several dozen - CCD frames of a given program field, presumably taken through several different filters, perhaps with arbitrary positional offsets, maybe even from several different telescopes. We must now correctly cross-identify the multiple observations of each star, in order both to average together the various observations through the same filter, and to permit constructing color indices from observations through different filters.
The third dirty problem is to evaluate the accuracy of the photometry and the completeness of the star detection through analysis of the artificial stars. This is closely related to the second dirty problem: it involves deciding whether an "object" which has been detected at a certain position in a CCD frame represents the discovery of a real star, or the recovery of an artificial star that had been planted near that location.
The comparatively clean problem that I alluded to is the conversion of the corrected instrumental magnitudes to magnitudes and colors on a real, standard photometric system. This requires essentially the same sort of extinction-and-color-transformation solution which astronomers have used for decades to calibrate their photomultiplier photometry. This problem is a natural target for (robust) least-squares techniques, and the rate at which CCDs can generate data (tens of thousands of stars per night) introduces some extra data-handling challenges. However, since this problem is a fairly conventional one, and space is limited, I do not plan to discuss it here.