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.
- jaxqsofit.model.reconstruct_spectral_components(*args, **kwargs)[source]#
Reconstruct posterior spectral components on a requested wavelength grid.
- jaxqsofit.model.build_host_template_grid(*args, **kwargs)[source]#
Build the host-galaxy template grid used by the spectral model.
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, return_line_components=True, emit_deterministics=True, custom_components=None, custom_line_components=None)[source]#
Joint AGN+host spectral forward model for NumPyro inference.
- 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 (ndarray)
samples (Dict[str, Any])
pred_out (Dict[str, Any] | None)
age_grid_gyr (Sequence[float])
logzsol_grid (Sequence[float])
dsps_ssp_fn (str)
prior_config (Dict[str, Any])
fit_poly (bool)
fit_poly_order (int)
fit_reddening (bool)
fe_uv_wave (ndarray)
fe_uv_flux (ndarray)
fe_op_wave (ndarray)
fe_op_flux (ndarray)
custom_components (Sequence[CustomComponentSpec] | None)
template_norms (Sequence[float] | None)
n_draws (int | None)
return_components (bool)
decompose_host (bool)
- 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 (ndarray)
age_grid_gyr (Sequence[float])
logzsol_grid (Sequence[float])
imf_type (int)
zcontinuous (int)
sfh (int)
dsps_ssp_fn (str)
z_qso (float)
build_physical_host_basis (bool)
template_norms (Sequence[float] | None)
- Return type:
- jaxqsofit.model.build_tied_line_meta_from_linelist(linelist, wave)[source]#
Build tied-line metadata arrays used by the NumPyro line model.