kinextract.evaluate_model_gp_joint

kinextract.evaluate_model_gp_joint(a: ndarray, st: FitState, design: ndarray, t_norm: ndarray, apply_continuum: bool = True) tuple[source]

Evaluate the joint forward model for a trial parameter vector.

Parameters:
  • a (ndarray) – Flat parameter vector: nl LOSVD bin values, nt template weights, then n_coef = design.shape[1] continuum P-spline coefficients.

  • st (FitState) – Fit state supplying the data/template/LOSVD-grid machinery.

  • design (ndarray, shape (npix, n_coef)) – Continuum B-spline design matrix from build_pspline_design().

  • apply_continuum (bool, optional) – If True (default), multiply the model by the continuum. Set False to get the continuum-free model (e.g. for diagnostics).

Returns:

  • gp (ndarray) – Model spectrum, length npix.

  • b (ndarray) – LOSVD histogram used to build the model (floored at 1e-6).

  • w (ndarray) – Template weights used to build the model (floored at 1e-12).

  • cont_coeffs (ndarray) – Continuum P-spline coefficients used to build the model.

  • cont (ndarray) – The continuum itself, design @ cont_coeffs, length npix.