kinextract.correct_recovered_losvd
- kinextract.correct_recovered_losvd(v_recovered: float, sigma_recovered: float, bias_table: dict) dict[source]
Apply an empirical bias correction from an
assess_recovery_bias()table.Interpolates bias_table at (v_recovered, sigma_recovered) (linear interpolation within the grid’s convex hull, nearest-neighbor outside it or if fewer than 4 grid points are available) and returns bias-corrected point estimates plus an inflated uncertainty incorporating the bias table’s own seed-to-seed scatter at that location – an empirically-calibrated alternative to the retired analytic
kinextract.errors.bias_corrected_losvd(), which is known to be unreliable near the instrumental resolution limit (see that function’s docstring).- Parameters:
v_recovered (float) – A real fit’s recovered velocity/dispersion (
kinextract.losvd.fit_losvd_gauss_hermite()’svherm/sherm) to correct.sigma_recovered (float) – A real fit’s recovered velocity/dispersion (
kinextract.losvd.fit_losvd_gauss_hermite()’svherm/sherm) to correct.bias_table (dict) – Output of
assess_recovery_bias(), built from mocks matched to the same target/instrument/configuration as the fit being corrected.
- Returns:
v_corrected,sigma_corrected(bias-subtracted point estimates) andv_uncertainty_inflation,sigma_uncertainty_inflation(the interpolated seed-to-seed standard deviation of the bias at this location, to be added in quadrature to whatever statistical uncertaintyLOSVDErrorEstimatorreports).- Return type: