get_factors

ell1fit.scaling.get_factors(fit_parameter_names, model, observation_length, parameters_with_unc=None, extra_uncertainties=None)[source]

Compute parameter scaling factors for numerically stable local fitting.

The factors set the size of local parameter variations sampled by the optimizer/MCMC, based on spin/orbital sensitivity heuristics.

extra_uncertainties is an optional {name: sigma} mapping of scales asserted from outside the heuristics – in practice the widths of the --prior overrides, via ell1fit.priors.user_prior_sigmas(). It joins the other candidates and wins only when it is the tightest of them, which is exactly the case that matters: a prior narrower than the heuristic scale would otherwise start the walkers outside its own support. Preconditioning cannot repair that afterwards, because a hard bound is precisely what stops it measuring the curvature it would need (precondition_factors()).