FitSetup

class ell1fit.setup_types.FitSetup(parameter_names: list, baseline_values: list, logprior_funcs: list, factors: list, template_funcs: list, parameters: dict, likelihood_func: object, weights: object = None, tolerance: float = 1e-08)[source]

Bases: object

Everything needed to evaluate the posterior at a trial position.

This is the bundle that defines what is being fitted: which parameters are free, where they start, how they are scaled, what they are compared against, and what prior constrains them.

Attributes:
parameter_nameslist of str

Names of the free parameters, in the order used by every local-coordinate array throughout the pipeline.

baseline_valueslist of float

Physical starting value of each free parameter – the initial term in physical = local * factor + initial.

logprior_funcslist of callable

One log-prior per free parameter, evaluated in physical units. Those with hard support carry a phys_bounds attribute.

factorslist of float

Per-parameter scale – the factor term in the same relation.

template_funcslist of callable

Pulse template per file, evaluated at a phase to give a probability density.

parametersdict

Full parameter mapping, including the fixed values the free parameters are varied against.

likelihood_funccallable

Statistic evaluated on phases.

weightslist of np.ndarray or None

Per-event weights, or None for an unweighted fit.

tolerancefloat

Deorbiting convergence tolerance, in seconds.

Attributes Summary

baseline_values

factors

likelihood_func

logprior_funcs

n_parameters

Number of free parameters.

parameter_names

parameters

template_funcs

tolerance

weights

Methods Summary

with_baseline_from(parameters)

Return a copy whose baseline is re-read from parameters.

Attributes Documentation

baseline_values: list = <dataclasses._MISSING_TYPE object>
factors: list = <dataclasses._MISSING_TYPE object>
likelihood_func: object = <dataclasses._MISSING_TYPE object>
logprior_funcs: list = <dataclasses._MISSING_TYPE object>
n_parameters

Number of free parameters.

parameter_names: list = <dataclasses._MISSING_TYPE object>
parameters: dict = <dataclasses._MISSING_TYPE object>
template_funcs: list = <dataclasses._MISSING_TYPE object>
tolerance: float = 1e-08
weights: object = None

Methods Documentation

with_baseline_from(parameters)[source]

Return a copy whose baseline is re-read from parameters.

Used after a stage moves a fitted value – the Phase_i trace, or a refinement pass – so the local coordinate system is re-centred on the updated position instead of drifting away from its origin.