Model Package#
Preferred Public Names#
- jaxqsofit.model.quasar_spectral_model(*args, **kwargs)[source]#
NumPyro spectral model for one configured quasar fit.
This is the preferred public name for the low-level AGN+host spectral model. The historical name
qso_fsps_joint_model()remains available for compatibility.- Parameters:
*args (tuple) – Additional positional arguments.
**kwargs (dict) – Additional keyword arguments.
- jaxqsofit.model.reconstruct_spectral_components(*args, **kwargs)[source]#
Reconstruct posterior spectral components on a requested wavelength grid.
- Parameters:
*args (tuple) – Additional positional arguments.
**kwargs (dict) – Additional keyword arguments.
- jaxqsofit.model.build_host_template_grid(*args, **kwargs)[source]#
Build the host-galaxy template grid used by the spectral model.
- Parameters:
*args (tuple) – Additional positional arguments.
**kwargs (dict) – Additional keyword arguments.
Compatibility Names#
- class jaxqsofit.model.FSPSTemplateGrid(wave, templates, template_meta, age_grid_gyr, logzsol_grid, host_basis_jax=None, t_obs_gyr=None)[source]#
Bases:
objectContainer for interpolated SSP templates and their metadata.
- Parameters:
wave (ndarray)
templates (ndarray)
template_meta (List[Dict[str, float]])
age_grid_gyr (ndarray)
logzsol_grid (ndarray)
host_basis_jax (Any | None)
t_obs_gyr (float | None)
- wave: ndarray#
- templates: ndarray#
- template_meta: List[Dict[str, float]]#
- age_grid_gyr: ndarray#
- logzsol_grid: ndarray#
- host_basis_jax: Any | None = None#
- t_obs_gyr: float | None = None#
- __init__(wave, templates, template_meta, age_grid_gyr, logzsol_grid, host_basis_jax=None, t_obs_gyr=None)#
- Parameters:
wave (ndarray)
templates (ndarray)
template_meta (List[Dict[str, float]])
age_grid_gyr (ndarray)
logzsol_grid (ndarray)
host_basis_jax (Any | None)
t_obs_gyr (float | None)
- Return type:
None
- jaxqsofit.model.qso_fsps_joint_model(wave, flux, err, conti_priors, tied_line_meta, fsps_grid, fe_uv_wave, fe_uv_flux, fe_op_wave, fe_op_flux, use_lines=True, prior_config=None, decompose_host=True, fit_pl=True, fit_fe=True, fit_bc=True, fit_poly=False, fit_poly_order=2, fit_reddening=False, z_qso=0.0, psf_mags=None, psf_mag_errs=None, psf_filter_curves=None, use_psf_phot=False, fe_uv_flux_on_wave=None, fe_op_flux_on_wave=None, balmer_bb_shape=None, balmer_tau_shape=None, balmer_below_edge=None, return_line_components=True, emit_deterministics=True, custom_components=None, custom_line_components=None)[source]#
Joint AGN+host spectral forward model for NumPyro inference.
Intrinsic reddening behavior#
When
fit_reddening=True, a single fitted E(B-V) attenuation screen is applied to the power-law continuum, Fe II templates, Balmer continuum, and custom nuclear continuum components. Emission lines and host-galaxy starlight are not attenuated by this screen. This is distinct from the separately configured Milky Way foreground correction.- param wave:
wave value.
- type wave:
object
- param flux:
flux value.
- type flux:
object
- param err:
err value.
- type err:
object
- param conti_priors:
conti_priors value.
- type conti_priors:
object
- param tied_line_meta:
tied_line_meta value.
- type tied_line_meta:
object
- param fsps_grid:
fsps_grid value.
- type fsps_grid:
object
- param fe_uv_wave:
fe_uv_wave value.
- type fe_uv_wave:
object
- param fe_uv_flux:
fe_uv_flux value.
- type fe_uv_flux:
object
- param fe_op_wave:
fe_op_wave value.
- type fe_op_wave:
object
- param fe_op_flux:
fe_op_flux value.
- type fe_op_flux:
object
- param use_lines:
use_lines value.
- type use_lines:
object
- param prior_config:
prior_config value.
- type prior_config:
object
- param decompose_host:
decompose_host value.
- type decompose_host:
object
- param fit_pl:
fit_pl value.
- type fit_pl:
object
- param fit_fe:
fit_fe value.
- type fit_fe:
object
- param fit_bc:
fit_bc value.
- type fit_bc:
object
- param fit_poly:
fit_poly value.
- type fit_poly:
object
- param fit_poly_order:
fit_poly_order value.
- type fit_poly_order:
object
- param fit_reddening:
Enable the intrinsic AGN E(B-V) screen described above.
- type fit_reddening:
bool
- param z_qso:
z_qso value.
- type z_qso:
object
- param psf_mags:
psf_mags value.
- type psf_mags:
object
- param psf_mag_errs:
psf_mag_errs value.
- type psf_mag_errs:
object
- param psf_filter_curves:
psf_filter_curves value.
- type psf_filter_curves:
object
- param use_psf_phot:
use_psf_phot value.
- type use_psf_phot:
object
- param fe_uv_flux_on_wave:
fe_uv_flux_on_wave value.
- type fe_uv_flux_on_wave:
object
- param fe_op_flux_on_wave:
fe_op_flux_on_wave value.
- type fe_op_flux_on_wave:
object
- param balmer_bb_shape:
balmer_bb_shape value.
- type balmer_bb_shape:
object
- param balmer_tau_shape:
balmer_tau_shape value.
- type balmer_tau_shape:
object
- param balmer_below_edge:
balmer_below_edge value.
- type balmer_below_edge:
object
- param return_line_components:
return_line_components value.
- type return_line_components:
object
- param emit_deterministics:
emit_deterministics value.
- type emit_deterministics:
object
- param custom_components:
custom_components value.
- type custom_components:
object
- param custom_line_components:
custom_line_components value.
- type custom_line_components:
object
- Parameters:
custom_components (Sequence[CustomComponentSpec] | None)
custom_line_components (Sequence[CustomLineComponentSpec] | None)
- jaxqsofit.model.reconstruct_posterior_components(wave_out, samples, pred_out, age_grid_gyr, logzsol_grid, dsps_ssp_fn, prior_config, fit_poly, fit_poly_order, fit_reddening, fe_uv_wave, fe_uv_flux, fe_op_wave, fe_op_flux, custom_components=None, template_norms=None, n_draws=None, return_components=True, decompose_host=True)[source]#
Rebuild posterior continuum components on an arbitrary rest-frame grid.
- Parameters:
wave_out (object) – wave_out value.
samples (object) – samples value.
pred_out (object) – pred_out value.
age_grid_gyr (object) – age_grid_gyr value.
logzsol_grid (object) – logzsol_grid value.
dsps_ssp_fn (object) – dsps_ssp_fn value.
prior_config (object) – prior_config value.
fit_poly (object) – fit_poly value.
fit_poly_order (object) – fit_poly_order value.
fit_reddening (object) – fit_reddening value.
fe_uv_wave (object) – fe_uv_wave value.
fe_uv_flux (object) – fe_uv_flux value.
fe_op_wave (object) – fe_op_wave value.
fe_op_flux (object) – fe_op_flux value.
custom_components (object) – custom_components value.
template_norms (object) – template_norms value.
n_draws (object) – n_draws value.
return_components (object) – return_components value.
decompose_host (object) – decompose_host value.
- Return type:
Dict[str, Any]
- jaxqsofit.model.build_fsps_template_grid(wave_out, age_grid_gyr=(0.1, 0.3, 1.0, 3.0, 10.0), logzsol_grid=(-1.0, -0.5, 0.0, 0.2), imf_type=1, zcontinuous=1, sfh=0, dsps_ssp_fn='tempdata.h5', z_qso=0.0, build_physical_host_basis=True, template_norms=None)[source]#
Build a host-galaxy SSP template matrix on the observed wavelength grid.
- Parameters:
wave_out (object) – wave_out value.
age_grid_gyr (object) – age_grid_gyr value.
logzsol_grid (object) – logzsol_grid value.
imf_type (object) – imf_type value.
zcontinuous (object) – zcontinuous value.
sfh (object) – sfh value.
dsps_ssp_fn (object) – dsps_ssp_fn value.
z_qso (object) – z_qso value.
build_physical_host_basis (object) – build_physical_host_basis value.
template_norms (object) – template_norms value.
- Return type:
- jaxqsofit.model.build_tied_line_meta_from_linelist(linelist, wave, *, pool_narrow_centroids=True)[source]#
Build tied-line metadata arrays used by the NumPyro line model.
With
pool_narrow_centroids=True, eligible narrow cores are split into low-ionization, high-ionization, and coronal families. Lines within each family share one exact centroid and one exact width. Complex-specific offsets are deliberately not created. Broad groups, broad-component hierarchies, and groups identified as wings or outflows are excluded. Atomic ties within a family remain intact; legacy ties spanning ionization families are split before family pooling.- Parameters:
linelist (object) – linelist value.
wave (object) – wave value.
pool_narrow_centroids (bool, optional) – If True (default), apply the exact shared NLR centroid behavior above. If False, retain independent cross-complex centroid parameters while preserving explicit line-table ties.
- Return type:
TiedLineMetadata