sheap.SheaProducts.SheaProducts module

SheaProducts Handling

Routines to post-process fitted or sampled parameter sets and compute derived physical quantities.

This module provides the SheaProducts class, which acts as a bridge between raw fitting/sampling outputs (parameter vectors) and scientifically useful quantities such as line fluxes, widths, equivalent widths, luminosities, and single-epoch black hole mass estimators.

Main Features

  • Unified interface to handle both: * single best-fit parameters (deterministic optimization), and * sampled parameters (Monte Carlo / MCMC posterior draws).

  • Automatic grouping of parameters by spectral region and profile.

  • Computation of: * line flux, FWHM, velocity width (km/s), * line centers, amplitudes, shape parameters, * equivalent width (EQW), * monochromatic and bolometric luminosities, * combined quantities (e.g. Hα+Hβ, Mg II+Fe, CIV blends).

  • uncertainties propagation via uncertainties.

Public API

  • SheaProducts:

    High-level handler that connects a ComplexSampler result to physical parameter extraction.

Typical Workflow

  1. Fit or sample spectra with RegionFitting or a sampler.

  2. Wrap the result in a ComplexSampler instance.

  3. Construct SheaProducts(samplerclass) from it.

  4. Call SheaProducts.extract_params() to obtain dictionaries

    of physical line quantities, optionally summarized across samples.

Notes

  • The attribute method determines whether results are handled as

    "single" (best fit) or "sampled" (posterior draws).

  • Many helpers internally rely on

    make_batch_fwhm_split[_with_error](), make_integrator(), and profile-specific shape functions.

class SheaProducts(*, samplerclass=None, model=None, dependencies=None, spectra=None, mask=None, sheapmodel=None, method=None, d=None, BOL_CORRECTIONS=None, SINGLE_EPOCH_ESTIMATORS=None, C_KMS=None, **extra)[source]

Bases: object

Parameters:

samplerclass (object | None)

calculate_sheap_products_sampled(idx, samples, combine=True, extra_products=True, **kwargs)[source]
calculate_sheap_products(combine=True, extra_products=True, **kwargs)[source]