---
title: "Measure starlight in a crowded sky"
description: "Learn photon counting, aperture and PSF photometry, then extract a measured TESS light curve and read modern source-separation methods."
canonical_url: "https://sandboxphysics.com/stories/stellar-photometry/"
language: "en"
page_type: "story"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/stories/stellar-photometry/"
---

AC02

# Measure starlight in a crowded sky

Sandbox Physics · 2026-10-28

A telescope turns each star into a patch of light. Follow the photons into pixels, learn to separate overlapping stars, and repeat a measurement on actual TESS data. Begin with the story, then work through the two measurement chapters before opening the data tutorial.

1. L1

   ## [Did the star really fade?](https://sandboxphysics.com/stories/stellar-photometry/whose-light/)

   Follow a circle around a star to see how blurred images, background and neighboring light change a brightness measurement.

2. L1

   ## [From one photoelectron to an aperture of pixels](https://sandboxphysics.com/stories/stellar-photometry/counting-photons/)

   Build a photon-counting model, aperture correction and signal-to-noise estimate, including the background that remains after subtraction.

3. L2

   ## [One pixel can contain light from two stars](https://sandboxphysics.com/stories/stellar-photometry/separating-stars/)

   Derive a weighted two-star fit from a two-pixel example, then test blending, uncertainty and injection recovery.

4. L3

   ## [Extract TESS brightness from twelve pixels](https://sandboxphysics.com/stories/stellar-photometry/tess-pixels/)

   Re-run aperture photometry on frozen measured TIC 25155310 Sector 1 pixels, keeping quality flags, background and failure examples.

5. L4

   ## [Read the residuals in deblending and difference images](https://sandboxphysics.com/stories/stellar-photometry/reading-crowded-images/)

   Read ZOGY, scarlet and version-pinned Rubin documentation to distinguish source separation, image differences and detections.

[Try the crowded-star detector](https://sandboxphysics.com/labs/crowded-star-photometry/)

## Sources and calculation scope

1. [MAST, Read and Display A TESS Target Pixel File](https://spacetelescope.github.io/mast_notebooks/notebooks/TESS/beginner_how_to_use_tp/beginner_how_to_use_tp.html)

   Target TIC 25155310, Sector 1, FITS columns and aperture bit 2. The frozen tutorial subset is extracted from this named product.

2. [TESS Science Data Products Description, Revision F (2020)](https://archive.stsci.edu/files/live/sites/mast/files/home/missions-and-data/active-missions/tess/_documents/EXP-TESS-ARC-ICD-TM-0014-Rev-F.pdf)

   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.

3. [Photutils 3.1.1, Aperture photometry](https://photutils.readthedocs.io/en/3.1.1/user_guide/aperture.html)

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

4. [Photutils 3.1.1, PSF photometry](https://photutils.readthedocs.io/en/3.1.1/user_guide/psf.html)

   Source grouping, fitted fluxes and the role of an accurate point-spread function. The teaching fit fixes both centroids and the Gaussian width.

5. [Zackay, Ofek & Gal-Yam (2016), Proper image subtraction, arXiv:1601.02655v2](https://arxiv.org/html/1601.02655v2)

   Read sections III.1, III.3, III.6, IV.1 and VIII.1–VIII.4; compare the difference image with its detection score. The guide reads the method, not a reproduced survey pipeline.

6. [Melchior et al. (2018), scarlet, arXiv:1802.10157v2](https://arxiv.org/abs/1802.10157v2)

   Section 2 and figure 1: multiband components, morphology constraints and residuals. Read alongside the authors’ documentation.

7. [scarlet authors, Core Concepts](https://pmelchior.github.io/scarlet/1-concepts.html)

   Components, observations and PSF convolution in the authors’ implementation; accessed 2026-10-28.

8. [Rubin Science Pipelines w\_2026\_41, ip\_diffim overview](https://pipelines.lsst.io/v/w_2026_41/modules/lsst.ip.diffim/overview_ipdiffim.html)

   Version-pinned subtraction tasks and Alard–Lupton kernel matching; prevents equating a historical paper with every current pipeline.
