kinextract.plot_losvd

kinextract.plot_losvd(fit: dict) None[source]

Plot the recovered non-parametric LOSVD with its Gauss-Hermite overlay.

Left panel: the non-parametric LOSVD b (histogram over velocity bins xl, km/s) recovered by the main fit, overlaid with a post-hoc Gauss-Hermite (GH) fit computed via kinextract.losvd.fit_losvd_gauss_hermite() (legacy fortran H3/H4 convention). The fitted mean velocity V is marked with a vertical dashed line, and the panel is annotated with the GH moments (V, sigma, h3, h4) alongside the simpler flux-weighted moments (v1, v2) for comparison. Right panel: the fractional weight assigned to each stellar template in the fit (fit["outputs"]["wfrac"]), useful for spotting templates that dominate or are unused. A one-line text summary of the GH fit is also printed to stdout.

Parameters:

fit (dict) – Output of run_spectral_fit(). Must contain fit["state"].xl (the LOSVD velocity grid, km/s), fit["outputs"]["b"] (the recovered LOSVD amplitudes), and fit["outputs"]["wfrac"] (per-template weight fractions).

Returns:

Displays the figure via plt.show() and prints a GH moment summary to stdout; does not return a value.

Return type:

None