Skip to content

deredden_interstellar

Deredden a spectrum for interstellar dust : F_0 = F / 10^(−0.4 A(λ)), CCM89 / F99 / G23.

Category Corrections
Backend dust_extinction
Version 1.0.0
Reads ctx.spectrum (a Spectrum1D)
Writes spectrum, metrics.a_v, metrics.deredden_factor_median

F_0(λ) = F(λ) / extinguish(λ) with extinguish(λ) = 10^(−0.4 · E(B−V) · R_V · A(λ)/A_V) from dust_extinction.parameter_averages.(Rv=rv).extinguish(λ, Ebv=ebv). Validity (fails outside, no extrapolation) : CCM89 and F99 1000–33 333 Å with R_V ∈ [2.0, 6.0] ; G23 912 Å – 32 μm with R_V ∈ [2.3, 5.6]. ebv ≥ 0 (ebv = 0 is the identity). Wavelengths must be in Ångström. Uncertainty : σ_0 = σ / extinguish(λ) — E(B−V) and R_V are taken as exact. Acceptance : 5500 Å, CCM89, R_V = 3.1, E(B−V) = 0.1 ⇒ factor 1.3300 (A_V = 0.31, A(5500)/A_V = 0.99885). Requires the 'reduction' extra (pip install 'spectro-kernel[reduction]').

Parameters

Parameter Default Required Description
ebv None yes Colour excess E(B−V) in magnitudes (≥ 0).
rv 3.1 - Total-to-selective extinction ratio R_V = A_V / E(B−V) (3.1 diffuse ISM).
law 'CCM89' - Extinction law : 'CCM89' (default), 'F99' or 'G23'.

Use it

from spectro_kernel import run_algorithm

output = run_algorithm("deredden_interstellar", ctx, {
    "ebv": "<value>",
    "rv": 3.1,
    "law": "CCM89"
})
spectro run deredden_interstellar --input spectrum.fits \
  --param ebv=<value> \
  --param rv=3.1 \
  --param law=CCM89
{
  "tool": "deredden_interstellar",
  "arguments": {
    "session_id": "<session_id>",
    "params": {
      "ebv": "<value>",
      "rv": 3.1,
      "law": "CCM89"
    }
  }
}

Every algorithm is an MCP tool of the same name; describe_algorithm returns this page's metadata as JSON.

References

  • Cardelli, Clayton & Mathis 1989, ApJ 345, 245 — CCM89 R_V-dependent extinction law (default).
  • Fitzpatrick 1999, PASP 111, 63 — F99 law.
  • Gordon et al. 2023, ApJ 950, 86 — G23 law (912 Å – 32 μm).
  • dust_extinction (astropy affiliated), https://dust-extinction.readthedocs.io — the package that evaluates the laws (wrapped, not re-implemented).