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
ComplexSamplerresult to physical parameter extraction.
Typical Workflow
Fit or sample spectra with
RegionFittingor a sampler.Wrap the result in a
ComplexSamplerinstance.Construct
SheaProducts(samplerclass)from it.- Call
SheaProducts.extract_params()to obtain dictionaries of physical line quantities, optionally summarized across samples.
- Call
Notes
- The attribute
methoddetermines whether results are handled as "single"(best fit) or"sampled"(posterior draws).
- The attribute
- 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)