jwspecabund.strong_line
Strong-line metallicity calibrations from Sanders et al. (2025).
Simultaneous polynomial fit across available diagnostic ratios (O3, O2, R23, O32) with Monte Carlo error propagation.
References
Sanders, R. L. et al. 2025, ApJ (submitted).
Functions
|
Compute available strong-line diagnostic ratios. |
|
Derive 12+log(O/H) via simultaneous Sanders+25 calibrations. |
- jwspecabund.strong_line.compute_line_ratios(line_fluxes, line_errors, snr_thresh=1.5)[source]
Compute available strong-line diagnostic ratios.
- jwspecabund.strong_line.sanders25_metallicity(line_fluxes, line_errors, n_mc=1000, snr_thresh=1.5, seed=42, progress=True)[source]
Derive 12+log(O/H) via simultaneous Sanders+25 calibrations.
- Parameters:
line_fluxes (dict) –
{line_name: flux}.line_errors (dict) –
{line_name: flux_err}.n_mc (int) – Monte Carlo iterations for error propagation (default 1000).
snr_thresh (float) – Minimum SNR for a ratio to be used (default 1.5).
seed (int) – Random seed for reproducibility.
progress (bool) – Show a
tqdmprogress bar (defaultTrue).
- Returns:
(Z_best, Z_lo, Z_hi, chi2, ratios_used, Z_mc_samples)where Z_best is 12+log(O/H), Z_lo/Z_hi are 16th/84th percentiles, chi2 is the best-fit chi-squared, ratios_used lists the diagnostics, and Z_mc_samples is the full MC array.- Return type:
- Raises:
ValueError – If no valid diagnostic ratios are available.