Skip to main content
Sandbox Physics
Measure starlight in a crowded sky

AC02 · L1

From one photoelectron to an aperture of pixels

Photometry begins with adding photoelectrons collected during an exposure. More target light usually makes random scatter less conspicuous. Adding more pixels also collects background and its noise, so a larger circle need not give a better measurement.

Decide what the count means

Use detector coordinates in pixels, with xx increasing to the right and yy downward. In one exposure the star contributes FF photoelectrons in total, and the sky contributes a mean BB per pixel. Photoelectrons are collected charge carriers. They equal incoming photon counts only for unit quantum efficiency and no other loss.

Brightness can be reported as photoelectrons per exposure or as a rate per second. Exposure time connects the two. The later TESS exercise uses a rate; the browser detector uses counts in one simulated exposure. Keep that distinction when comparing numbers.

Let P(x,y)P(x,y) describe the fraction of light per unit pixel area. Its integral over the whole plane is one. A detector pixel has a finite area, so integrate the profile over its square instead of reading only the value at its center. Think of integration as cutting the square into tiny pieces and adding their contributions.

∬P(x,y) dx dy=1,Pi=∫xi−1/2xi+1/2∫yi−1/2yi+1/2P(x,y) dy dx\iint P(x,y)\,dx\,dy=1,\qquad P_i=\int_{x_i-1/2}^{x_i+1/2}\int_{y_i-1/2}^{y_i+1/2}P(x,y)\,dy\,dx
The integral is a fraction. Multiplication by the total stellar photoelectrons gives the mean stellar count in that pixel.

Why repeated exposures differ

Independent photon arrivals produce Poisson counts. A count with mean NN has variance NN as well. Variance measures the average squared departure from the mean; its square root is the standard deviation.

A mean of ten thousand photoelectrons therefore has a photon-noise standard deviation of one hundred, or one percent. A mean of one hundred has a standard deviation of ten, or ten percent. Readout electronics add another noise contribution. Independent contributions add in variance.

E[N]=λ,Var⁡(N)=λ,σN=λ,Var⁡(yi)=FPi+B+σread2\mathbb E[N]=\lambda,\quad\operatorname{Var}(N)=\lambda,\quad\sigma_N=\sqrt\lambda,\qquad\operatorname{Var}(y_i)=FP_i+B+\sigma_{\mathrm{read}}^2
Read noise here is specified as a standard deviation in photoelectrons, so it must be squared. Dark current and flat-field errors are omitted.

Add an aperture and correct the missing light

Write wiw_i for the fraction of pixel ii covered by the circular aperture. It is one inside, zero outside and intermediate at the edge. Subtract the estimated background, multiply by these weights and add. The same weighted sum of the target profile gives the enclosed fraction EE. Dividing by that fraction compensates for lost target light.

A centered circular Gaussian provides a useful continuum check. Integrating rings of the profile gives the fraction enclosed within a radius. On a coarse detector, retain the pixel integration and aperture weights; the continuum expression supplies a useful limiting check.

E=∑iwiPi,F^=∑iwi(yi−B^)EE=\sum_iw_iP_i,\qquad\widehat F=\frac{\sum_iw_i(y_i-\widehat B)}E
Use identical weights in numerator and denominator. An off-center aperture needs its own enclosed fraction.
P(r)=e−r2/(2σ2)2πσ2,E(<R)=∫0R2πrP(r) dr=1−e−R2/(2σ2)P(r)=\frac{e^{-r^2/(2\sigma^2)}}{2\pi\sigma^2},\qquad E(<R)=\int_0^R2\pi rP(r)\,dr=1-e^{-R^2/(2\sigma^2)}
Width and radius are both in pixels. Substitution in the radial integral gives the final exponential.

Reading: Photutils 3.1.1, Aperture photometry · TESS Science Data Products Description, Revision F (2020)

Work through a brightness measurement

Suppose a star contributes ten thousand photoelectrons, of which the aperture collects nine tenths. The aperture contains twenty-five complete pixels. Each has a sky contribution of one hundred electrons and read noise of four electrons. There is no neighbor, and the mean sky is known exactly. The expected aperture total is eleven thousand five hundred. Subtracting two thousand five hundred sky electrons leaves nine thousand; dividing by nine tenths recovers ten thousand.

The variance contains nine thousand stellar electrons, two thousand five hundred background electrons and twenty-five read-noise variances. It is 9000+2500+25×16=119009000+2500+25\times16=11900. Its square root is about one hundred nine. Aperture correction gives a flux uncertainty of about one hundred twenty-one and a signal-to-noise ratio of about eighty-two and a half.

Estimating the sky from another region adds uncertainty. Subtracting the same estimated background from every aperture pixel gives their errors a shared contribution.

Var⁡(F^)=∑iwi2Var⁡(yi)+(∑iwi)2Var⁡(B^)E2\operatorname{Var}(\widehat F)=\frac{\sum_iw_i^2\operatorname{Var}(y_i)+(\sum_iw_i)^2\operatorname{Var}(\widehat B)}{E^2}
This assumes the sky estimate comes from an independent region. Correlation with the aperture requires covariance terms. The teaching aperture treats its background input as known.

Why expanding the circle can hurt

Near the center, new pixels contribute substantial stellar light. Far out, they contribute little target light but still add background noise. A useful radius depends on the profile, the sky and neighboring objects. A fixed radius cannot be best for every image.

Increase the example’s background tenfold and calculate the signal-to-noise ratio again. Then consider an exposure long enough to increase both target and background. Following the contributions separately makes it easier to adapt the method to a different observation.

Exercises and explanations

  1. With photon noise dominant, how much does four times the exposure improve signal-to-noise?

    Read the explanation

    The signal increases fourfold and its Poisson variance also increases fourfold. Standard deviation doubles, so signal-to-noise doubles. This assumes no saturation, changing background or additional systematics.

  2. An aperture contains twenty-five pixels. The subtracted background is too high by three electrons per pixel and the enclosed fraction is nine tenths. What is the flux bias?

    Read the explanation

    The sum loses seventy-five extra electrons. Aperture correction gives a bias −75/0.9≈−83.3-75/0.9\approx-83.3 electrons. More aperture area accumulates more of the same sky error.

  3. Why does subtracting the mean background leave its photon noise?

    Read the explanation

    Subtracting a constant shifts the count distribution without changing its scatter. The extra or missing background photons in each exposure still differ from that mean.

Try the prediction

Isolate the sky contribution

  1. Choose A star on its own, keeping aperture and blur fixed.
  2. Predict how a brighter sky will change the scatter of the cyan fitted curve, then change the sky setting.
  3. Export one pixel record and distinguish expected counts from the noisy measurements.

Sources and calculation scope

  1. TESS Science Data Products Description, Revision F (2020)

    Section 4.2.2, Table 8: FLUX is already background-subtracted; FLUX_BKG and FLUX_BKG_ERR preserve the removed estimate. Table 32 describes quality flags.

  2. Photutils 3.1.1, Aperture photometry

    Fractional aperture weighting, background subtraction and error propagation. The browser uses its own documented midpoint area quadrature.

FeedbackSomething broken, confusing, or missing on this page?Tell us
What kind of feedback?

Sent with this page’s address, its Lab ID, the site language and your device type. Please leave out personal details. Feedback is kept for up to 12 months.Privacy policy