<p>Because the uncertainties in the number of counts detected in each pixel are considered to be independent. That means some of them are higher than the "true value" (the count rate you would measure if you observed for an infinitely long time), whilst others are lower. To some extent these independent uncertainties will cancel, and the net result is that for normally distributed errors the correct protocol is what you have described.</p>

<p>Perhaps a good way of seeing this is that suppose you took 100 <em>independent</em> measurements of the same thing, each with its own, roughly equal uncertainty. If I asked what the uncertainty in the average was, you wouldn't just add up all the errors and divide by 100 because that would give an uncertainty that was identical to that of an individual measurement. Instead you would do the quadrature sum of the uncertainties and divide by 100, which reduces the uncertainty in the average by a factor of $\sqrt{100}$.</p>

CC BY-SA 3.0
2017-07-08T04:55:51.480Z
I understand and agree with your answer for statistical calculations (e.g., S/N ratio). But what about in the case of systematic offsets/biases? Suppose I measure 100 counts in my aperture, and then I find the background residual RMS level near my aperture and multiply that by the # of pixels in my aperture to get a total expected # of counts due to background fluctuations alone. If that calculation gives me ~90 counts, does that mean that in the worst case scenario, 90/100~90% science aperture counts could be from background fluctuations? How do I turn that into a systematic errorbar?
quantumflash
CC BY-SA 3.0
2017-07-08T06:16:11.960Z
@quantumflash You deal with it using error propagation formulae in a similar way. The number of background counts in the aperture (assuming that the background has been predicted as $b \pm \delta b$) is $b \pm ((\delta b)^2 + b)^{0.5}$.
ProfRob
CC BY-SA 3.0
2017-07-08T06:30:48.170Z
Thanks a lot! Why are you adding b in the sqrt? Also, your calculation is for background counts in an aperture, whereas what if I'm working with a background-subtracted image but I have derived an RMS map for background subtraction residuals? Basically the overall median background level is close to 0, but there can be fluctuations due to the subtraction residuals. Can I create an array of random gaussian values with the ~0 mean given above and sigma=median RMS? The array would have the same size as the # of pixels in my aperture. Then I can do quadrature sum, and do -2.5*log10(sum) + magzp?
quantumflash
CC BY-SA 3.0
2017-07-04T12:47:55.263Z
2017-07-04T12:47:55.263Z
ProfRob
<p>Suppose I have a 2D data array with number of counts in each pixel (i.e., this is the image array). Suppose I have another 1-1 mapped same-shape data array that gives the 1-sigma Gaussian standard deviation in the number of counts in each pixel in the image (i.e., this is the error array). </p>

<p>If I do circular aperture photometry, I just calculate -2.5*log10(summed counts within aperture) + magnitudeZeropoint. </p>

<p>On the other hand, for the magnitude uncertainty on my aperture magnitude, I read that I'm supposed to do a quadrature sum of the errors within my aperture, then compute the fractional flux uncertainty as the ratio of my quadrature-summed uncertainty divided by my measured counts from the image, and then magnitude error = 2.5*log10(1 + fractional flux uncertainty). </p>

<p>How come the uncertainties have to be quadrature summed ($\sqrt{\Sigma \sigma_{x,y}^2}$), instead of just added up like I do with the image pixel values? The quadrature sum results in a smaller errorbar but is that realistic? Also, I emphasize that my data arrays are in units of counts (i.e., ADU's), not electrons.</p>

<observational-astronomy><photometry>
Aperture photometry uncertainties
quantumflash
# Aperture photometry uncertainties

(Asked by: username_0 on 2017-07-04)

Suppose I have a 2D data array with number of counts in each pixel (i.e., this is the image array). Suppose I have another 1-1 mapped same-shape data array that gives the 1-sigma Gaussian standard deviation in the number of counts in each pixel in the image (i.e., this is the error array).

If I do circular aperture photometry, I just calculate -2.5\*log10(summed counts within aperture) + magnitudeZeropoint.

On the other hand, for the magnitude uncertainty on my aperture magnitude, I read that I'm supposed to do a quadrature sum of the errors within my aperture, then compute the fractional flux uncertainty as the ratio of my quadrature-summed uncertainty divided by my measured counts from the image, and then magnitude error = 2.5\*log10(1 + fractional flux uncertainty).

How come the uncertainties have to be quadrature summed ($\sqrt{\Sigma \sigma\_{x,y}^2}$), instead of just added up like I do with the image pixel values? The quadrature sum results in a smaller errorbar but is that realistic? Also, I emphasize that my data arrays are in units of counts (i.e., ADU's), not electrons.

**Tags:** observational-astronomy, photometry


---

## 1 answers

### Answer by username_1 on 2017-07-04. Score: 1 | Accepted answer

Because the uncertainties in the number of counts detected in each pixel are considered to be independent. That means some of them are higher than the "true value" (the count rate you would measure if you observed for an infinitely long time), whilst others are lower. To some extent these independent uncertainties will cancel, and the net result is that for normally distributed errors the correct protocol is what you have described.

Perhaps a good way of seeing this is that suppose you took 100 *independent* measurements of the same thing, each with its own, roughly equal uncertainty. If I asked what the uncertainty in the average was, you wouldn't just add up all the errors and divide by 100 because that would give an uncertainty that was identical to that of an individual measurement. Instead you would do the quadrature sum of the uncertainties and divide by 100, which reduces the uncertainty in the average by a factor of $\sqrt{100}$.

> **Comments:**
> **username_0**: I understand and agree with your answer for statistical calculations (e.g., S/N ratio). But what about in the case of systematic offsets/biases? Suppose I measure 100 counts in my aperture, and then I find the background residual RMS level near my aperture and multiply that by the # of pixels in my aperture to get a total expected # of counts due to background fluctuations alone. If that calculation gives me ~90 counts, does that mean that in the worst case scenario, 90/100~90% science aperture counts could be from background fluctuations? How do I turn that into a systematic errorbar?  
> **username_1**: @username_0 You deal with it using error propagation formulae in a similar way. The number of background counts in the aperture (assuming that the background has been predicted as $b \pm \delta b$) is $b \pm ((\delta b)^2 + b)^{0.5}$.  
> **username_0**: Thanks a lot! Why are you adding b in the sqrt? Also, your calculation is for background counts in an aperture, whereas what if I'm working with a background-subtracted image but I have derived an RMS map for background subtraction residuals? Basically the overall median background level is close to 0, but there can be fluctuations due to the subtraction residuals. Can I create an array of random gaussian values with the ~0 mean given above and sigma=median RMS? The array would have the same size as the # of pixels in my aperture. Then I can do quadrature sum, and do -2.5*log10(sum) + magzp?  

---

