---
title: "A faint spectrum through Webb’s slit Interactive Lab | Sandbox Physics"
description: "How does Webb separate a faint infrared spectrum from its background? Cooling reduces the telescope’s own infrared emission."
canonical_url: "https://sandboxphysics.com/labs/jwst-nirspec-fixed-slit/"
language: "en"
page_type: "lab"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/labs/jwst-nirspec-fixed-slit/"
last_modified: "2026-11-23"
---

# A faint spectrum through Webb’s slit

**How does Webb separate a faint infrared spectrum from its background?** Cooling reduces the telescope’s own infrared emission. Aligned mirrors direct more of the target into the slit. A blank exposure measures the remaining background, and dark, flat and lamp measurements turn the detector reads into a wavelength-calibrated spectrum.

Move a star across the slit, warm the optical surface, and compare the original detector reads with the extracted spectrum.

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

Star across the slit $0\,\mathrm{arcsec}$ Outer mirror path offset $0\,\mathrm{nm}$ Emitting surface temperature $45\,\mathrm{K}$ Integration time $96\,\mathrm{s}$

Model assumptions

This is a synthetic S200A1 fixed-slit exercise near 3.82 μm, with ideal hexagonal segments and a simple disperser. The detector uses a finite cutout, Poisson shot noise, independent read noise and assumed response. Backgrounds match between target and blank. Uncertainty bars are conditional on the supplied aperture and calibration. All temperatures, gain and exposure data are teaching values. The warmer case is hypothetical. No flight calibration files, absolute fluxes, real detector ramps or observed Webb sensitivity are used.

## Why Webb cools the mirror before subtracting the background

**Background** A warm infrared telescope sends its own photons toward the detector. In a faint spectrum those photons can be more numerous than the target photons. Webb’s sunshield lets the mirror and the near-infrared instruments cool by radiating to space.

**Why it matters** A narrower, steadier star image helps send target photons through the slit. The exposures still need a dark, a flat, a wavelength lamp and a blank sky measurement.

- **Focus question**: Why does a warm telescope leave a noisier measurement even after background removal?
- **One-sentence intuition**: A blank exposure estimates the mean background. The individual photon arrivals in the target and blank exposures fluctuate independently.

### Core mathematical model

#### Add phases before squaring

$$
U(\boldsymbol\theta)=F_{\mathrm{hex}}(k\boldsymbol\theta)\sum_j e^{ik(p_j-\boldsymbol\theta\cdot\mathbf r_j)},\quad k=\frac{2\pi}{\lambda}
$$

The segment centers and reflected path offsets are in metres. F is the field from one hexagon. The receiving slit admits a finite portion of the intensity computed from the sum.

#### Count thermal photons within a wavelength bin

$$
B_{\lambda,\mathrm{ph}}(T)=\frac{2c}{\lambda^4}\frac{1}{\exp[hc/(\lambda k_\mathrm B T)]-1}
$$

Temperature is in kelvin and wavelength is in metres. The photon radiance is integrated in wavelength and multiplied by area, solid angle and an assumed conversion factor.

#### Subtract the blank in the same pixels

$$
D_{\mathrm{net}}(c)=\sum_r\frac{R_{\mathrm{target}}(r,c)-R_{\mathrm{blank}}(r,c)}{g(r,c)}
$$

Rates R come from stored reads in equivalent electrons per second. The flat and dark frames supply the relative gain g. The net may be negative. A separate correction accounts for the finite slit and supplied optical throughput.

### Common difficulties

#### The slit and cold optics address different losses

**Typical misconception** An ideal background measurement recovers the light that missed the slit.

**Better mental model** Background subtraction estimates a contribution inside the slit. Light blocked by the slit stays unobserved. An aperture correction needs a supported model of how much light passed.

#### Kept reads share accumulated charge

**Typical misconception** Every group of reads counts fresh photons from zero.

**Better mental model** Within an exposure, a later read includes earlier charge. Different exposures have independent photon counts in this model.

### Run the experiment

1. 01

   #### Keep the centred exposure

   Open the detector panel. Switch from the target to the blank without changing the saved observation.

   **What to observe:** The target frame contains the star trace and the background. The blank estimates background from a separate set of reads.

2. 02

   #### Move the star across the slit

   Drag the gold handle and compare the predicted transmitted fraction. Capture a new exposure near the edge.

   **What to observe:** The slit removes a larger fraction of the star. If too little light enters, aperture correction becomes unstable and the experiment withholds the estimate.

3. 03

   #### Compare the warm surface

   Choose Warm optical surface. Compare the blank and target frames with the default record.

   **What to observe:** Both frames accumulate more thermal photons, even though the average thermal background cancels in their difference. More photon noise remains.

4. 04

   #### Follow the detector reads

   Change the read group and export the original records.

   **What to observe:** Rows and columns retain their ADU codes at each saved time, including the bias. The spectrum comes from finite differences and calibration of the recorded exposures.

Physical conclusion

Keep the original reads, independent references and pointing. A calibrated spectrum carries both a signal estimate and the uncertainty left by the observation.

## Related experiments and articles

How physics instruments measure · Reading path

### How physics instruments measure

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

1. [Article **How Webb separates a faint spectrum from infrared background**](https://sandboxphysics.com/stories/instruments/jwst-infrared-spectroscopy/)

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)
