---
title: "Direct Imaging beside Stellar Glare Interactive Lab | Sandbox Physics"
description: "Is that faint point a companion or a speckle? A companion follows the rotating sky; instrumental speckles tend to stay with the pupil."
canonical_url: "https://sandboxphysics.com/labs/pupil-engineering-coronagraph/"
language: "en"
page_type: "lab"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/labs/pupil-engineering-coronagraph/"
last_modified: "2026-11-03"
---

O067 · AC22 · A point that turns

# Direct Imaging beside Stellar Glare

**Is that faint point a companion or a speckle?** A companion follows the rotating sky; instrumental speckles tend to stay with the pupil. Subtracting the stellar halo also removes companion light and mixes spectral channels. Known-source injections measure that response. Noise, position and PSF uncertainty determine how well the spectrum can be recovered.

Watch a faint source turn through a fixed stellar halo, then measure how subtracting that halo changes its spectrum.

> Interactive simulation: open this page in a web browser to change the parameters and run the model.

[Observe a companion](https://sandboxphysics.com/labs/pupil-engineering-coronagraph/) [Optical bench](https://sandboxphysics.com/labs/pupil-engineering-coronagraph/?mode=bench)

Model assumptions

Synthetic scalar Lyot-coronagraph observations use an eight-metre circular pupil, five finite J-band channels, prescribed static and evolving optical-path errors, photon counting and read noise. One acquired cube supplies the camera replay, ADI or SDI processing and finite-injection response. Source angle is enlarged by the camera display; rotation represents pupil-tracking field rotation, not orbital motion. The pupil, mask, Lyot stop and final camera are conjugate planes in the preserved Optical bench mode. The observing model is a teaching instrument, not the GPI optical prescription or an adaptive-optics controller. Aperture spectra use empirical comparison-ring covariance plus estimated source photon noise; the quoted statistic is nominal and not a global detection probability. Source-dependent KLIP, small comparison samples, position and PSF uncertainty require the separate validation in the course. Real GPI observations are analyzed in a local-download tutorial; observed pixels are not embedded here while their redistribution terms remain unresolved.

The residual and spectrum use the same synthetic detector frames. The dashed spectrum shows the prescribed input for comparison.

After subtraction and derotation

Recovered contrast spectrum

Each injected band changes the output

What the uncertainty includes

The aperture estimate conditions on the chosen source position and adopted PSF. Mean-ADI and mean-SDI photon propagation is exact for their fixed numerical operators. Data-dependent KLIP uses finite source-photon resampling with its basis recomputed. Neither removes uncertainty in a covariance estimated from a few correlated comparison patches. The course tests this with independent complete acquisitions, a spatial–spectral position profile and PSF mismatch.

Physics tutorial

## Follow the point, then account for the light

**Background** A coronagraph reduces the bright on-axis stellar field before the camera. Residual optical-path errors still scatter coherent starlight into a speckled halo.

**Why it matters** A faint point becomes persuasive when its motion and its processed flux agree with the same optical model.

Start with the essentials

- **Focus question**: How much of a companion survives subtracting a reference made from its own images?
- **One-sentence intuition**: A reduction acts on the source as well as the halo. Calibrate the complete operator, including its source-dependent reference, before interpreting a spectrum.

### Core mathematical model

#### Optical-path error makes phase

$$
\phi_\lambda=2\pi W/\lambda
$$

Path error and wavelength use the same length unit. Path error is not mirror surface displacement.

#### Count photons before subtracting

$$
D_{t\ell p}\sim\operatorname{Poisson}\!\left[N_\star(p_{\star,t\ell p}+c_\ell p_{{\rm s},t\ell p})+b\right]+\mathcal N(0,\sigma_{\rm r}^2)
$$

The camera PSFs retain coronagraph and finite-field losses; they are not renormalized to unit transmitted flux.

#### Calibrate a coupled spectrum

$$
\widehat{\boldsymbol c}=(A^{\mathsf T}C^{-1}A)^{-1}A^{\mathsf T}C^{-1}\boldsymbol y
$$

The response columns come from separate channel injections before all processing. Singular response directions cannot be measured by this inverse.

### Common difficulties

#### A bright residual is not a probability

**Typical misconception** A large local statistic directly gives the probability that a planet is real.

**Better mental model** Comparison samples are few and correlated; a blind search adds trials. The tutorial keeps the nominal statistic separate from null experiments.

#### A known injection does not create new observations

**Typical misconception** Adding an empirical PSF to a real cube simulates an independent observation with all its noise.

**Better mental model** It measures conditional processing response on that frozen background. Independent photon and speckle realizations need separate simulations.

### Run the experiment

1. 01

   #### Watch a rotating source

   Open A companion turns. Drag its hollow cyan handle; the source is a synthetic input, not a detected position marker.

   **What to observe:** The sampled camera source follows the same field rotation used in derotation.

2. 02

   #### Lose most of its light

   Choose Almost no rotation, then compare the processed aperture response.

   **What to observe:** A reference sees nearly the same source in every frame, so subtraction removes nearly all of it.

3. 03

   #### Mix the channels

   In the advanced group choose spectral plus angular subtraction and inspect the response matrix.

   **What to observe:** An injection into one band can change several extracted bands; diagonal throughput correction alone misses that effect.

Physical conclusion

A sharp residual image is a useful observation, but a calibrated spectrum needs a response and a defensible noise model.

## Related experiments and articles

From stellar glare to a companion spectrum · Reading path

### From stellar glare to a companion spectrum

Articles on this path that use this experiment, followed by the other experiments they suggest.

1. [Article **The faint point that turns beside a star**](https://sandboxphysics.com/stories/direct-imaging/the-point-that-turns/)
2. [Article **From a pupil wave to counted camera pixels**](https://sandboxphysics.com/stories/direct-imaging/from-pupil-to-pixels/)
3. [Article **Why subtracting a halo also subtracts a companion**](https://sandboxphysics.com/stories/direct-imaging/rotation-and-self-subtraction/)
4. [Article **Recover a spectrum without losing its uncertainty**](https://sandboxphysics.com/stories/direct-imaging/recovering-a-coupled-spectrum/)
5. [Article **Extract a contrast spectrum from three GPI exposures**](https://sandboxphysics.com/stories/direct-imaging/betapic-gpi-tutorial/)
6. [Article **Read the papers that separate speckles from companions**](https://sandboxphysics.com/stories/direct-imaging/reading-speckles-and-wavefront-control/)

Waves & optics · Starter path

## From one ray to interference measurement

Start with refraction, find where the ray picture stops working, then use interference to measure tiny distances.

[Start here → **Optical Boundary Explorer** Turn the incident angle and watch reflected and transmitted power trade off. Then switch to the critical-angle scene. Observe · 11 min](https://sandboxphysics.com/labs/optical-boundary-explorer/)

1. [1 Optical Boundary Explorer](https://sandboxphysics.com/labs/optical-boundary-explorer/)
2. [2 Rainbow Caustic Observatory](https://sandboxphysics.com/labs/rainbow-laboratory/)
3. [3 Camera Obscura](https://sandboxphysics.com/labs/camera-obscura/)
4. [4 Coherent Wave Composer](https://sandboxphysics.com/labs/coherent-wave-composer/)
5. [5 Young Double-Slit Bench](https://sandboxphysics.com/labs/young-double-slit-bench/)
6. [6 Michelson Precision Lab](https://sandboxphysics.com/labs/michelson-precision-lab/)

[View the full path →](https://sandboxphysics.com/topics/waves-and-optics/#starter-path)
