<p>The underlying rationale for doing something like this is that sometimes you have a source (e.g. a star or distant galaxy) that's detected in one image (say, a near-infrared image) and you want to know how bright it is in a different image (say, a blue optical image). So -- assuming the different images are astrometrically calibrated to you can locate where the source <em>should</em> be in the second image -- you do an aperture measurement on the second image.</p>
<p>If there <em>isn't</em> a visible source there, you may still want to have an estimate of how bright it <em>could</em> be in the blue and still go undetected in that image. (You might have two different models for the source: in one model, it's very bright in the blue, and you should have detected it; in the other, it's faint enough in the blue to be consistent with not seeing it in your image.) So measuring an upper limit in cases where you can't immediately see a source is still scientifically useful.</p>
<p>(This is leaving aside the issue that, as @ProfRob pointed out, this example seems to be wrong in the details of how you would calculate a 3-sigma upper limit for the aperture photometry. A better approach might be to perform multiple aperture-photometry measurements in different blank regions of the image (e.g., regions where you have good reason to believe there aren't any sources at all) and use those to get the standard deviation.)</p>

CC BY-SA 4.0
2021-08-22T09:29:38.273Z
2021-08-22T09:29:38.273Z
Peter Erwin
<p>The calculated standard deviation is often used as the uncertainty in the measured flux of a single pixel. What you are doing is saying that if the source was three times as bright as this, you would claim it has been detected. Hence this is an upper limit for detection of flux in a single pixel at three times the standard deviation.</p>
<p>However, I don't completely understand the logic here, since the source would normally occupy several, if not many pixels, so the relationship of the number you have calculated to actual detection threshold (or limiting magnitude) of a point source is more complex and depends on the point spread function.</p>

CC BY-SA 4.0
2021-08-22T08:47:17.757Z
2021-08-22T08:47:17.757Z
ProfRob
<p>I am trying to learn aperture photometry using python</p>
<p>I noticed the following logic in the image below, where an upper limit was determined by simulating an undetected star and the standard deviation was calculated. Why is this logic needed during photometry? What is the purpose of finding an upper limit and calculating the standard deviation for it?</p>
<p><a href="https://i.sstatic.net/OP0nx.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/OP0nx.png" alt="enter image description here" /></a></p>

CC BY-SA 4.0
2021-08-22T09:11:01.730Z
"finding an upper limit and calculating the standard deviation for it" -- you've got it backwards: the example is about estimating the standard deviation and then estimating the upper limit from *that*.
Peter Erwin
<python><photometry>
During aperture photometry when simulating an undetected star, why must an upper limit and standard deviation need to be calculated?
Robin
# During aperture photometry when simulating an undetected star, why must an upper limit and standard deviation need to be calculated?

(Asked by: username_0 on 2021-08-22)

I am trying to learn aperture photometry using python

I noticed the following logic in the image below, where an upper limit was determined by simulating an undetected star and the standard deviation was calculated. Why is this logic needed during photometry? What is the purpose of finding an upper limit and calculating the standard deviation for it?

[![enter image description here](https://i.sstatic.net/OP0nx.png)](https://i.sstatic.net/OP0nx.png)

**Tags:** python, photometry

> **Comments:**
> **username_1**: "finding an upper limit and calculating the standard deviation for it" -- you've got it backwards: the example is about estimating the standard deviation and then estimating the upper limit from *that*.  

---

## 2 answers

### Answer by username_1 on 2021-08-22. Score: 3

The underlying rationale for doing something like this is that sometimes you have a source (e.g. a star or distant galaxy) that's detected in one image (say, a near-infrared image) and you want to know how bright it is in a different image (say, a blue optical image). So -- assuming the different images are astrometrically calibrated to you can locate where the source *should* be in the second image -- you do an aperture measurement on the second image.

If there *isn't* a visible source there, you may still want to have an estimate of how bright it *could* be in the blue and still go undetected in that image. (You might have two different models for the source: in one model, it's very bright in the blue, and you should have detected it; in the other, it's faint enough in the blue to be consistent with not seeing it in your image.) So measuring an upper limit in cases where you can't immediately see a source is still scientifically useful.

(This is leaving aside the issue that, as @username_2 pointed out, this example seems to be wrong in the details of how you would calculate a 3-sigma upper limit for the aperture photometry. A better approach might be to perform multiple aperture-photometry measurements in different blank regions of the image (e.g., regions where you have good reason to believe there aren't any sources at all) and use those to get the standard deviation.)


---

### Answer by username_2 on 2021-08-22. Score: 3

The calculated standard deviation is often used as the uncertainty in the measured flux of a single pixel. What you are doing is saying that if the source was three times as bright as this, you would claim it has been detected. Hence this is an upper limit for detection of flux in a single pixel at three times the standard deviation.

However, I don't completely understand the logic here, since the source would normally occupy several, if not many pixels, so the relationship of the number you have calculated to actual detection threshold (or limiting magnitude) of a point source is more complex and depends on the point spread function.


---

