Strictly speaking it doesn't, but it's a really good idea for avoiding subtle and easily preventable mistakes. What GALFIT really needs is for the units of pixel ADU × GAIN to be [electron], the basic counting unit, if you want GALFIT to generate the sigma image for you. And there are other combinations where that is true that would work (see below). First, a clarification (hopefully) on the usage of the terms counts and ADU: An ADU (Analog-to-Digital Unit) is a scale factor that relates the number of elections in a pixel with a pixel value. There are many reasons why it may not be desirable for 1 ADU to equal 1 electron. Regardless of the reason, it is pretty fundamental for data analysis to want to know how many electrons went into producing a pixel value, and GAIN is the keyword that usually comes to mind. As far as units are concerned, an ADU is rather like a metaphysical unit because it has whatever unit a pixel value has, and the units of a pixel can be a lot of things. But in common usage ADU is used interchangeably with "counts." When a pixel value has flux units, it is more common to explicitly say "ADU per second" or "counts per second," even though an ADU can equally well be defined as a flux unit. This FAQ uses ADU (≡ count) to explicitly differentiate from ADU/sec (≡ count/sec).
Confusion sometimes creeps in when, during data processing, the units for GAIN don't get propagated along even as the image pixels change units from, say [counts], into [counts/sec], [MJy/sr], etc.. When that happens, the GAIN parameter lives on as a meaningless thing in the header. As mentioned earlier, knowing how to go from image ADU into [electrons] is fundamental to data analysis, for which GAIN is the most obvious go-to keyword (even if there is another, having GAIN be present alongside that other is just as confusing). GALFIT either needs to have, or needs to create, a σ-image to fit an image, as explained in more detail here, and mixing units can be costly.
So the notion that GALFIT likes the ADUs to have units of [counts], and not [counts/sec], refers to when the units for GAIN remains unchanged from its initial definition, after data processing, which happens more often than not. So, if you want GALFIT to create the σ-image, it is important to always first figure out what are the units for GAIN. However, the important points that you should take away when working with GALFIT are these:
For GALFIT to produce reliable σ images, the data ought to have proper units for GALFIT to convert data values into electrons via the GAIN parameter. Nevertheless, this notion is very abstract, and it is easy to neglect the importance especially when visual inspections show that the residuals look good. So just how much does it matter?
Below are two sets of simulation, both provided to me by Takahiro Morishita (Tohoku University of Japan). The first set (Figures 1, 2, and 3) shows what happens when the image pixels have units of [counts/sec] whereas the GAIN is in [electrons/ADU], with ADU being in [counts] rather than [counts/sec]. The last figure shows the same analysis he performed on simulations where the image pixels have units of [counts]. His simulations, being such a beautiful example of this issue, I asked permission to share them with the public.
Figure 1 shows simulations of idealized Sérsic n < 2.5 and n > 2.5 galaxies, based on fitting images where the data numbers have units of [counts/sec] but the image GAIN has units of [electrons/count], allowing GALFIT to generate the σ-image for the fit. The galaxies were placed into blank fields, without neighbors, with idealized Poisson noise. The top panel shows the magnitude offsets between the output and input magnitudes, where the output magnitudes get systematically fainter compared to the input. The upward trend is quite noticeable and significant even at fairly bright magnitudes. The output sizes in the middle panels show a large systematic trend toward smaller output sizes. And the output Sérsic index values are systematically underestimated.
FIT RESULTS WHEN THE UNITS of [ADU] × [GAIN] ≠ [electrons];
Figure 1: Output fit parameter deviations as a function of input magnitude for single component, idealized galaxies with Sérsic profiles. The galaxies are isolated and have idealized noise. Left: Sérsic indices n < 2.5. Right: Sérsic index values n > 2.5. Top: Differences between output and input magnitude. Middle: Ratio of output and input sizes. Bottom: Ratio of output and input Sérsic index values. Provided by Takahiro Morishita.
If one were to accept the above ideas as being true, then it may lead one to take the next logical step, which is to try and remove the systematic biases by fitting a function to the simulation data, and subtracting out the median trend from the individual data points. The result should, in principle, have no bias in the median. Doing so to the magnitude and size parameters produces the following two Figures:
RESULTS AFTER SUBTRACTING OUT THE MEDIAN TREND IN MAGNITUDE FROM FIGURE 1
Figure 2: An attempt at correcting the systematics in magnitudes by subtracting the best fitting median trend in Figure 1. Note the large scatter remains, and the scatter is nevertheless non-symmetric even when the median is now effectively zero. Provided by Takahiro Morishita.
RESULTS AFTER SUBTRACTING OUT THE MEDIAN TREND IN SIZE FROM FIGURE 1
Figure 3: An attempt at correcting the systematics in size by subtracting the best fitting median trend in Figure 1. Note the large scatter remains, and the scatter is nevertheless non-symmetric even when the median is now effectively zero. Provided by Takahiro Morishita.
In contrast to the above approach, Takahiro Morishita produced a plot showing test results when the same simulations as above are run using data with the correct unit of [counts], with GAIN in [electrons/count], rather than in flux rate units above:
FIT RESULTS WHEN THE IMAGE HAS CORRECT UNITS WHERE [ADU] × [GAIN] = [electrons]
Figure 4: The same simulation set as Figure 1, except where the pixel units pair up correctly with GAIN, which GALFIT expects for producing a σ-image. Compare with Figure 1 to see the dramatic differences in the scatter and systematic trends between the two figures. The two plots are shown at the same scale. Provided by Takahiro Morishita.
In summary, getting the units right is very important if one wants GALFIT to generate accurate σ-images. Working with images in [counts/sec] when the GAIN is in [electrons/count] may seem on the surface to be perfectly fine. However, when GALFIT is asked to generate a σ-image based on images with the wrong units, in all likelihood the measurement accuracy will not be good. Even if one can "correct" for biases, such an approach may not be reliable. In fact because the σ-images would be wrong, the noise properties in simulations would likely be different from the noise properties of actual data. If so, the fits may be biased in different ways when applied to real data, even after "bias corrections." Perfectly idealized simulations ought not show systematics, to any significant extent, if the simulations are produced correctly. If one cannot accurately recover idealized simulations parameters, whether for galaxies in isolation or placed into real images, it is a warning sign that the data units (or the gain) may not be correct for GALFIT to generate a reliable σ-image.
Go back to GALFIT Home Page.
Go back to Chien Peng's Home Page.