Skip to content

sii_electron_density

Electron density n_e (cm⁻³) from the [S II] λ6716/λ6731 ratio.

Category Nebular diagnostics
Backend scipy - implemented here on top of scipy primitives
Version 1.1.0
Reads ctx.spectrum (a Spectrum1D)
Writes metrics.ne_cm3, metrics.ratio, metrics.sii_ratio, metrics.log_ne, metrics.flux_6716, metrics.flux_6731, extras.regime, extras.notes, extras.method, extras.sii_regime, extras.sii_notes, extras.sii_method

F = |amp| · |σ| · √(2π) per line (shared Gaussian-line primitive). Default window ±5.0 Å so the 14.4 Å doublet stays resolved. The polynomial domain [0.45, 1.43] is enforced by clamp; the regime label records 'valid' / 'low-density' / 'high-density' / 'invalid'. v1.1.0: the generic keys metrics['ratio'] and extras['regime'|'notes'|'method'] are shared with oiii_electron_temperature and get overwritten in a pipeline ; the prefixed aliases metrics['sii_ratio'] and extras['sii_regime'|'sii_notes'|'sii_method'] carry the same values unambiguously.

Parameters

Parameter Default Required Description
lambda_6716 6716.44 - Rest wavelength (Å) of [S II] 6716 (default: NIST air).
lambda_6731 6730.82 - Rest wavelength (Å) of [S II] 6731 (default: NIST air).
window 5.0 - Half-width (Å) of the fit window around each line.

Use it

from spectro_kernel import run_algorithm

output = run_algorithm("sii_electron_density", ctx, {
    "lambda_6716": 6716.44,
    "lambda_6731": 6730.82,
    "window": 5.0
})
spectro run sii_electron_density --input spectrum.fits \
  --param lambda_6716=6716.44 \
  --param lambda_6731=6730.82 \
  --param window=5.0
{
  "tool": "sii_electron_density",
  "arguments": {
    "session_id": "<session_id>",
    "params": {
      "lambda_6716": 6716.44,
      "lambda_6731": 6730.82,
      "window": 5.0
    }
  }
}

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

References

  • Proxauf, Öttl & Kimeswenger 2014, A&A 561, A10 — improved n_e from nebular line ratios (Eq. 6, Table 2).
  • Osterbrock & Ferland 2006, Astrophysics of Gaseous Nebulae and AGN, 2nd ed., University Science Books — §5.4.
  • Kramida et al., NIST ASD — air rest wavelengths λ6716.44, λ6730.82.
  • bpt_line_ratios - Measure BPT line ratios + classify a galaxy (HII / Composite / Seyfert / LINER).
  • oiii_electron_temperature - Electron temperature Te (K) from the [O III] (λ4959+λ5007)/λ4363 ratio.