assign_logpriors

ell1fit.priors.assign_logpriors(fit_parameter_names, parameters_with_unc, obs_length=1, user_priors=None)[source]

Assign per-parameter log-prior functions from values and uncertainties.

Priors are rule-based: bounded uniforms for orbital-shape/phase parameters, broad uniforms when uncertainties are unavailable, and Gaussian priors when uncertainties are provided.

Parameters:
fit_parameter_nameslist of str

Free parameters needing a prior, in fit order.

parameters_with_uncdict

{name: [value, uncertainty]}. A NaN uncertainty means the parfile did not provide one, which selects the broad-uniform branch below.

obs_lengtharray-like, optional

Per-file observation durations in seconds.

user_priorslist of PriorSpec, optional

Overrides from ell1fit --prior. Each one replaces the rule that would otherwise apply to the parameter it names, and a spec naming a parameter that is not being fitted raises rather than being ignored.

Returns:
list of callable

One log-prior per entry of fit_parameter_names, evaluated in physical units. Those with hard support also carry a phys_bounds attribute; see _flat_logprior().