---
title: "Redshift stretches a spectrum and dust reshapes it"
description: "Derive frequency and wavelength redshift factors, a flat-spectrum K correction, and a rest-frame dust model with explicit stellar-age assumptions."
canonical_url: "https://sandboxphysics.com/stories/galaxy-colors/dust-and-moving-spectra/"
language: "en"
page_type: "story"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/stories/galaxy-colors/dust-and-moving-spectra/"
last_modified: "2026-10-28"
---

[Galaxy colors from photons to redshift distributions](https://sandboxphysics.com/stories/galaxy-colors/)

L2 · Galaxy photometry

# Redshift stretches a spectrum and dust reshapes it

Sandbox Physics · 2026-10-28

To predict a galaxy color, first choose its emitted spectrum, attenuate it inside the galaxy, shift it to observed wavelengths, then integrate through the actual filters. Keeping that order exposes two different operations: dust changes the relative strengths of wavelengths; redshift changes where those wavelengths arrive.

## Before you begin

The preceding chapter defines wavelength and frequency flux densities and photon-weighted filter means. We now use luminosity, luminosity distance and a short change-of-variable argument.

## Use luminosity distance once

Let $L_\lambda(\lambda_e)$ denote emitted energy per second per Angstrom, summed over all directions. The subscript e marks the galaxy rest frame. Luminosity distance $D_L$ is defined so that total received flux equals total luminosity divided by $4\pi D_L^2$. It already accounts for cosmological photon-energy loss and arrival-time dilation.

An emitted wavelength interval stretches by the same factor as its central wavelength. Divide the luminosity in the corresponding emitted slice by the larger observed interval, keeping the luminosity-distance normalization. This gives the wavelength-density relation below. Frequency intervals shrink instead, so the frequency-density relation contains the opposite factor.

$$
f_\lambda(\lambda_o)=\frac{L_\lambda(\lambda_o/(1+z))}{4\pi D_L^2(1+z)}
$$

The observed wavelength interval is wider by the stretch factor. Integrating over it restores the bolometric luminosity-distance relation.

$$
f_\nu(\nu_o)=\frac{(1+z)L_\nu((1+z)\nu_o)}{4\pi D_L^2}
$$

The observed frequency interval is narrower. Converting this equation back to wavelength density gives the preceding equation, provided the speed-of-light units agree.

Reading: Hogg et al. · Doi et al.

## A K correction compares two filter measurements

Absolute magnitude describes how bright the source would appear at ten parsecs in a chosen rest-frame filter. Apparent magnitude uses a chosen observed filter. Distance modulus accounts for geometric dimming; the K correction accounts for the different spectral pieces those filters measure. Its sign depends on the spectrum and on the pair of filters.

Consider the same AB filter in both frames and a frequency-density luminosity that is constant across every wavelength the filter needs. The redshift equation makes the observed frequency density larger by the stretch factor relative to the unshifted density at the same luminosity distance. Taking the magnitude logarithm gives a negative K correction. This simple limit is a useful sign test.

$$
m_R=M_Q+5\log_{10}\!\left(\frac{D_L}{10\,\mathrm{pc}}\right)+K_{QR}(z)
$$

The subscripts specify the rest filter Q and observed filter R. These may differ. A K correction is not an additional dimming factor to apply after a full spectral redshift and filter integration.

$$
K_{RR}^{\mathrm{flat}\ f_\nu}(z)=-2.5\log_{10}(1+z)
$$

At zero redshift the correction is zero; at redshift one it is about minus 0.753 magnitude. A code using the reciprocal frequency-density factor predicts the wrong sign.

Reading: Hogg et al. · SDSS DR17 imaging fluxes and flux calibration

## Apply galaxy dust at the galaxy wavelength

Use the Calzetti stellar-continuum attenuation curve as one specific dust prescription. It is an empirical description of starburst galaxies, combining absorption, scattering and the arrangement of stars and dust. It is not a universal law for every single grain or a Milky Way foreground extinction curve.

Write its continuum color excess as $E_s(B-V)$. At each rest wavelength, multiply the stellar spectrum by the attenuation below. Its published range is 0.12 to 2.2 microns; our redshift and filter limits stay within it. The curve has $R_V=4.05$, and the stellar continuum color excess differs from the color excess measured from gas emission lines.

Milky Way foreground extinction belongs to a different frame: it acts after the extragalactic light arrives here. The SDSS tutorial removes the catalogue foreground extinction band by band, scaling both flux and statistical uncertainty. It then fits the separate internal-galaxy attenuation parameter.

$$
L_{\nu,\mathrm{attenuated}}(\lambda_e)=L_{\nu,*}(\lambda_e)\,10^{-0.4 E_s(B-V)\,k(\lambda_e)}
$$

This multiplicative factor also applies to wavelength density because it changes the energy at a fixed wavelength. For continuum color excess 0.2, the attenuation is about 0.810 magnitude at 5500 Angstrom and about 1.99 magnitudes at 1600 Angstrom.

Reading: Calzetti et al. · SDSS DR17 imaging fluxes and flux calibration

## Give stellar age a model meaning

The frozen source file contains BC03 spectra for a single stellar population: stars formed in one brief event, with fixed solar metallicity and a Salpeter initial mass function. Seven ages from one hundred million to ten billion years are extracted by linear interpolation in age and frequency density, matching the pinned EzGal routine. We normalize each rest spectrum at 5500 Angstrom; its absolute mass scale is discarded.

Increasing this age changes the surviving stars and their absorption spectrum. It is physically different from turning an arbitrary break-strength knob. A real galaxy can mix many ages, change metallicity and contain nebular emission. Five colors can favor one of our model ages without determining a unique formation history.

The model also excludes a population older than the universe at its trial redshift. The teaching cosmology is spatially flat with present expansion rate seventy kilometres per second per megaparsec and matter fraction 0.3, with radiation neglected. At redshift 0.85 its age is about 6.4 billion years, so a ten-billion-year SSP is unavailable. The next chapter accounts for this restriction when assigning nuisance-parameter weights.

Reading: Bruzual & Charlot · EzGal model distribution

## Worked example of the operations in order

Start with the 2.154-billion-year template and continuum color excess 0.1. Move it to redshift 0.325 and set its observed r-band mean to one hundred nanomaggies. That last normalization absorbs luminosity distance and total stellar mass; the experiment is comparing colors. The nominal four-thousand-Angstrom feature arrives at 5300 Angstrom. Raising redshift to 0.85 moves it to 7400 Angstrom.

Now hold redshift at 0.325 and increase dust. Every feature remains at the same observed wavelength, but blue light falls more strongly before the common r normalization is restored. Finally change age at fixed redshift and dust. The intrinsic absorption structure and slope change together. These three trials give different spectral operations even when a few broad-band ratios happen to agree.

| Input redshift | Nominal break position | Flat-frequency same-filter K |
| --- | --- | --- |
| $0$ | $4000\,\mathrm{\mathring A}$ | $0\,\mathrm{mag}$ |
| $0.325$ | $5300\,\mathrm{\mathring A}$ | $-0.306\,\mathrm{mag}$ |
| $0.85$ | $7400\,\mathrm{\mathring A}$ | $-0.668\,\mathrm{mag}$ |

Reading: Hogg et al. · Calzetti et al.

## Try the observation

### [Separate moving a feature from changing its contrast](https://sandboxphysics.com/labs/galaxy-colors-photometric-redshift/)

1. Use the default population and move only redshift. Compare the nominal break positions with the saved table.
2. Restore the default redshift and change only dust, then only age. Explain which changes preserve feature positions and which preserve neither the slope nor the absorption pattern.

## Exercises and explained answers

A program integrates the redshifted luminosity through the observed filter, then applies a separately tabulated K correction. What must you inspect?

Inspect whether the spectral integration already includes the density redshift factor and the chosen rest/observed filter definitions. If it does, the K correction is already encoded. Applying it again double-counts the spectral transformation. Compare with the flat-frequency same-band limit.

A fitted ten-billion-year population appears at redshift 0.85. Is the right repair to reduce its dust?

Dust changes attenuation, not the time available for stars to evolve. The population is older than the assumed universe there. Exclude that age or revise the cosmological and population assumptions explicitly.

Would a stronger four-thousand-Angstrom break uniquely establish an older real galaxy?

Within a fixed SSP sequence it can favor a later model age. Metallicity and mixtures of young and old stars also change the break. A precise real-galaxy age requires a stated population model and additional information.

[Previous: What a filter measures when a detector counts photons](https://sandboxphysics.com/stories/galaxy-colors/counting-light-through-filters/) [Next: Keep both answers when a redshift distribution has two peaks](https://sandboxphysics.com/stories/galaxy-colors/when-redshift-has-two-answers/)

## Sources and calculation scope

1. [Hogg et al., The K correction, astro-ph/0210394v1 (2002)](https://arxiv.org/abs/astro-ph/0210394v1)

   Equations (2)–(12): spectral densities, photon response, redshift factors and the AB K correction. We use luminosity distance and define wavelength densities per Angstrom.

2. [Doi et al., Photometric Response Functions of the SDSS Imager, arXiv:1002.3701v1 (2010)](https://arxiv.org/abs/1002.3701v1)

   Table 4 response curves as distributed by speclite at commit 8159ea61f1c8539136660b4c2e87fbbf94a70097. The sdss2010 quantum throughputs already include an atmosphere at airmass 1.3; source files and BSD notice are retained.

3. [Bruzual & Charlot, Stellar population synthesis at the resolution of 2003, astro-ph/0309134v1](https://arxiv.org/abs/astro-ph/0309134v1)

   Sections 2–3 describe the stellar-population model and its spectral evolution. The frozen solar-metallicity Salpeter SSP file is distributed by EzGal; this course fixes its model choices rather than inferring a general galaxy age.

4. [EzGal model distribution, commit 133c62b383fae964701b673e62517293161b41d5](https://github.com/cmancone/easyGalaxy/tree/133c62b383fae964701b673e62517293161b41d5)

   tests/data/bc03\_ssp\_z\_0.02\_salp.model, primary image and the vs/ages FITS tables. README acknowledgements explicitly describe the model authors’ redistribution permission; the repository MIT notice is retained. Spectra are converted from fnu at ten parsecs into relative shapes.

5. [Calzetti et al., The Dust Content and Opacity of Actively Star-forming Galaxies, astro-ph/9911459v1 (2000)](https://arxiv.org/abs/astro-ph/9911459v1)

   Section 3.3, equations (2)–(5): empirical starburst stellar-continuum attenuation from 0.12 to 2.2 microns, with RV=4.05. The stellar continuum color excess differs from that of nebular gas.

6. [SDSS DR17 imaging fluxes and flux calibration](https://www.sdss4.org/dr17/algorithms/fluxcal/)

   The AB-offset and physical-flux sections state the approximate u shift, tentative z shift and their uncertainties. The tutorial freezes TOP 24 clean primary GALAXY spectra with zWarning=0 ordered by specObjID, keeping linear modelFlux values and inverse variances.
