Backend
Generic backend config
BackendConfig
pydantic-model
Bases: BaseModel
Backend config models with shared tracing options.
Config:
default:MODEL_CONFIG
Fields:
-
trace(StrictBool) -
plot_every(PositiveInt) -
plot_step_percent(PlotStepPercent)
plot_every = 50
pydantic-field
Write the first progress plot after this many evaluations. Later plots follow plot_step_percent on a log-scaled schedule.
plot_step_percent = 10
pydantic-field
Relative plotting cadence after the first plot. The default of 10 reproduces the current 10%-per-decade schedule.
trace = True
pydantic-field
Whether to actively trace the run or not.
validate_for_solver(solver)
Validate solver-dependent config constraints.
Available backends
Nautilus
pydantic-model
Bases: BackendConfig
Configuration for the nautilus backend.
Fields:
-
trace(StrictBool) -
plot_every(PositiveInt) -
plot_step_percent(PlotStepPercent) -
num_live_points(PositiveInt) -
n_batch(PositiveInt)
n_batch = 100
pydantic-field
Minimal number of likelihood evaluation performed at once.
num_live_points = 3000
pydantic-field
Number of live points used by the nested sampler.
plot_every = 50
pydantic-field
Write the first progress plot after this many evaluations. Later plots follow plot_step_percent on a log-scaled schedule.
plot_step_percent = 10
pydantic-field
Relative plotting cadence after the first plot. The default of 10 reproduces the current 10%-per-decade schedule.
trace = True
pydantic-field
Whether to actively trace the run or not.
validate_for_solver(solver)
Validate solver-dependent config constraints.
Nessai
pydantic-model
Bases: BackendConfig
Configuration for the nessai backend.
Fields:
-
trace(StrictBool) -
plot_every(PositiveInt) -
plot_step_percent(PlotStepPercent) -
num_live_points(PositiveInt) -
engine_kwargs(dict[str, Any])
Validators:
-
_validate_engine_key_conflicts
engine_kwargs
pydantic-field
Additional keyword arguments forwarded to nessai's FlowSampler. Reserved keys such as 'nlive', 'output', and 'importance_nested_sampler' are not allowed.
num_live_points = 3000
pydantic-field
Number of live points used by the nested sampler.
plot_every = 50
pydantic-field
Write the first progress plot after this many evaluations. Later plots follow plot_step_percent on a log-scaled schedule.
plot_step_percent = 10
pydantic-field
Relative plotting cadence after the first plot. The default of 10 reproduces the current 10%-per-decade schedule.
trace = True
pydantic-field
Whether to actively trace the run or not.
validate_for_solver(solver)
Validate solver-dependent config constraints.
Ultranest
pydantic-model
Bases: BackendConfig
Configuration for the ultranest backend.
Fields:
-
trace(StrictBool) -
plot_every(PositiveInt) -
plot_step_percent(PlotStepPercent) -
num_live_points(PositiveInt) -
resume(StrictBool) -
use_step_sampler(StrictBool)
num_live_points = 1000
pydantic-field
Number of live points used by the nested sampler.
plot_every = 50
pydantic-field
Write the first progress plot after this many evaluations. Later plots follow plot_step_percent on a log-scaled schedule.
plot_step_percent = 10
pydantic-field
Relative plotting cadence after the first plot. The default of 10 reproduces the current 10%-per-decade schedule.
resume = True
pydantic-field
Resume a previous UltraNest run if checkpoint files exist.
trace = True
pydantic-field
Whether to actively trace the run or not.
use_step_sampler = False
pydantic-field
Enable UltraNest's population step sampler.
validate_for_solver(solver)
Validate solver-dependent config constraints.
LevenbergMarquardt
pydantic-model
Bases: BackendConfig
Configuration for the Levenberg-Marquardt backend.
Fields:
-
trace(StrictBool) -
plot_every(PositiveInt) -
plot_step_percent(PlotStepPercent) -
x0_physical(ndarray | None) -
init_from_prior(StrictBool) -
reparametrise(StrictBool) -
engine_kwargs(dict[str, Any])
Validators:
-
_validate_x0_physical→x0_physical -
_validate_initialisation_strategy
engine_kwargs
pydantic-field
Additional keyword arguments forwarded to scipy.optimize.least_squares().
init_from_prior = False
pydantic-field
Initialise the optimizer from a draw from the prior.
plot_every = 50
pydantic-field
Write the first progress plot after this many evaluations. Later plots follow plot_step_percent on a log-scaled schedule.
plot_step_percent = 10
pydantic-field
Relative plotting cadence after the first plot. The default of 10 reproduces the current 10%-per-decade schedule.
reparametrise = False
pydantic-field
If True, search in unconstrained logit-of-CDF space. If False (default), search in physical space with explicit prior bounds via scipy's trf method — matches XSPEC's leven.
trace = True
pydantic-field
Whether to actively trace the run or not.
x0_physical = None
pydantic-field
Initial parameter vector in physical parameter space. Must contain one value per free parameter.
Iminuit
pydantic-model
Bases: BackendConfig
Configuration for the iminuit backend.
Fields:
-
trace(StrictBool) -
plot_every(PositiveInt) -
plot_step_percent(PlotStepPercent) -
x0_physical(ndarray | None) -
init_from_prior(StrictBool) -
run_hesse(StrictBool) -
strategy(int) -
tol(PositiveFloat | None) -
engine_kwargs(dict[str, Any])
Validators:
-
_validate_x0_physical→x0_physical -
_validate_initialisation_strategy
engine_kwargs
pydantic-field
Additional keyword arguments forwarded to Minuit.migrad().
init_from_prior = False
pydantic-field
Initialise the optimizer from a draw from the prior.
plot_every = 50
pydantic-field
Write the first progress plot after this many evaluations. Later plots follow plot_step_percent on a log-scaled schedule.
plot_step_percent = 10
pydantic-field
Relative plotting cadence after the first plot. The default of 10 reproduces the current 10%-per-decade schedule.
run_hesse = True
pydantic-field
Run HESSE after MIGRAD to estimate parameter covariance.
tol = None
pydantic-field
MIGRAD EDM stopping tolerance. The actual stop threshold is 0.002 * tol * errordef (so iminuit's default tol=0.1 with errordef=1 gives an EDM threshold of 2e-4). Set to None to keep iminuit's default.
trace = True
pydantic-field
Whether to actively trace the run or not.
x0_physical = None
pydantic-field
Initial parameter vector in physical parameter space. Must contain one value per free parameter.
Emcee
pydantic-model
Bases: BackendConfig
Configuration for the emcee backend.
Fields:
-
trace(StrictBool) -
plot_every(PositiveInt) -
plot_step_percent(PlotStepPercent) -
x0_physical(ndarray | None) -
init_from_prior(StrictBool) -
num_warmup(PositiveInt) -
num_samples(PositiveInt) -
num_walkers(PositiveInt) -
init_spread(PositiveFloat)
Validators:
-
_validate_x0_physical→x0_physical -
_validate_initialisation_strategy
init_from_prior = False
pydantic-field
Initialise the optimizer from a draw from the prior.
init_spread = 0.001
pydantic-field
Relative Gaussian spread applied to the initial point to generate the walker ensemble.
num_samples = 10000
pydantic-field
Number of production samples to draw after warmup.
num_walkers = 32
pydantic-field
Number of walkers in the ensemble sampler.
num_warmup = 100
pydantic-field
Number of warmup or burn-in steps to discard.
plot_every = 50
pydantic-field
Write the first progress plot after this many evaluations. Later plots follow plot_step_percent on a log-scaled schedule.
plot_step_percent = 10
pydantic-field
Relative plotting cadence after the first plot. The default of 10 reproduces the current 10%-per-decade schedule.
trace = True
pydantic-field
Whether to actively trace the run or not.
x0_physical = None
pydantic-field
Initial parameter vector in physical parameter space. Must contain one value per free parameter.