kinextract.estimate_losvd_errors
- kinextract.estimate_losvd_errors(fit: dict, cfg, *, run_laplace: bool = True, run_bootstrap: bool = True, run_bias: bool = True, n_bootstrap: int = 200, block_size: int = 1, n_jobs: int = 1, bootstrap_seed: int = 42, confidence: float = 0.68, plot: bool = True, write_to_files: bool = False, prefix: str | None = None, outdir: str | Path = '.') dict[source]
Convenience wrapper: run all requested error estimation methods and return the combined summary.
- Parameters:
fit (output of run_spectral_fit())
cfg (FitConfig used for the original fit)
run_laplace (compute Laplace posterior covariance)
run_bootstrap (run residual bootstrap)
run_bias (compute bias-corrected LOSVD)
n_bootstrap (number of bootstrap replicates)
block_size (block size for correlated-noise bootstrap)
n_jobs (parallel workers for bootstrap (-1 = all CPUs))
bootstrap_seed (RNG seed)
confidence (confidence level for intervals (0.68 ≈ 1-sigma))
plot (show plots when done)
write_to_files (write error estimates to .losvd_errs.out, .gh_errs.out files)
prefix (output file prefix (required if write_to_files=True))
outdir (output directory for files (default: current directory))
- Returns:
summary –
- If write_to_files=True, also includes keys:
’losvd_errs_file’: path to {prefix}.losvd_errs.out ‘gh_errs_file’: path to {prefix}.gh_errs.out ‘bootstrap_diag_file’: path to {prefix}.bootstrap_diag.txt (if bootstrap run)
- Return type:
dict (see LOSVDErrorEstimator.summarize)