Skip to content

oiii_electron_temperature

Electron temperature Te (K) from the [O III] (λ4959+λ5007)/λ4363 ratio.

Category Nebular diagnostics
Backend scipy - implemented here on top of scipy primitives
Version 2.0.0
Reads ctx.spectrum (a Spectrum1D)
Writes metrics.te_kelvin, metrics.ratio, metrics.oiii_ratio, metrics.oiii_ratio_doublet, metrics.ratio_5007_4363, metrics.ratio_5007_4959, metrics.flux_5007, metrics.flux_4959, metrics.flux_4363, metrics.oiii_doublet_from_fit, extras.regime, extras.notes, extras.method, extras.oiii_regime, extras.oiii_notes, extras.oiii_method, extras.oiii_doublet_source

F = |amp| · |σ| · √(2π) per line (shared Gaussian-line primitive, default window ±8.0 Å). metrics['ratio'] (= 'oiii_ratio' = 'oiii_ratio_doublet') is the doublet ratio [F(4959)+F(5007)]/F(4363); the v1 single-line ratio is kept as metrics['ratio_5007_4363']. Returns NaN te_kelvin when ratio ≤ 7.90 (log argument non-positive) or Te ∉ [3000, 30000] K. The validity regime is exposed in extras['regime'] (and the prefixed alias extras['oiii_regime']) so downstream code can treat it explicitly. v2.0.0: the 7.90 prefactor now multiplies the (4959+5007)/4363 doublet ratio as in Osterbrock & Ferland 2006 Eq. 5.4 — v1.x applied it to F(5007)/F(4363) alone, which biased Te high (R5007 = 100 : 12961 K → 11635 K ; R5007 = 50 : 17830 K → 15413 K). λ4959 is now fitted (new param lambda_4959) and falls back to F(5007)·(1+1/2.98) when unmeasurable ; the path is recorded in extras['oiii_doublet_source']. Prefixed keys oiii_* were added alongside the generic ratio/regime/notes/method keys.

Parameters

Parameter Default Required Description
lambda_5007 5006.84 - Rest wavelength (Å) of [O III] 5007 (default: NIST air).
lambda_4959 4958.911 - Rest wavelength (Å) of [O III] 4959 (default: NIST air). Fitted when in range; otherwise F(4959) = F(5007)/2.98 is assumed.
lambda_4363 4363.21 - Rest wavelength (Å) of [O III] 4363 (default: NIST air).
window 8.0 - Half-width (Å) of the fit window around each line.

Use it

from spectro_kernel import run_algorithm

output = run_algorithm("oiii_electron_temperature", ctx, {
    "lambda_5007": 5006.84,
    "lambda_4959": 4958.911,
    "lambda_4363": 4363.21,
    "window": 8.0
})
spectro run oiii_electron_temperature --input spectrum.fits \
  --param lambda_5007=5006.84 \
  --param lambda_4959=4958.911 \
  --param lambda_4363=4363.21 \
  --param window=8.0
{
  "tool": "oiii_electron_temperature",
  "arguments": {
    "session_id": "<session_id>",
    "params": {
      "lambda_5007": 5006.84,
      "lambda_4959": 4958.911,
      "lambda_4363": 4363.21,
      "window": 8.0
    }
  }
}

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

References

  • Osterbrock & Ferland 2006, Astrophysics of Gaseous Nebulae and AGN, 2nd ed., University Science Books — Eq. 5.4, (4959+5007)/4363 = 7.90·exp(32900/T).
  • Aller 1984, Physics of Thermal Gaseous Nebulae, Reidel — Eq. 5-3 (5-level atom inversion).
  • Storey & Zeippen 2000, MNRAS 312, 813 — theoretical [O III] 5007/4959 ratio 2.98 (doublet reconstruction when 4959 is absent).
  • Kramida et al., NIST ASD — air rest wavelengths λ5006.84, λ4958.911, λ4363.21.
  • bpt_line_ratios - Measure BPT line ratios + classify a galaxy (HII / Composite / Seyfert / LINER).
  • sii_electron_density - Electron density n_e (cm⁻³) from the [S II] λ6716/λ6731 ratio.