PriorSpec¶
- class ell1fit.priors.PriorSpec(name, shape, relative, args, text=None)[source]¶
Bases:
objectOne command-line prior override, parsed but not yet built.
Kept separate from the log-prior objects themselves because a spec is resolved against the fit before it becomes a prior:
F1has to be matched to the per-fileF1_0,F1_1, … that are actually fitted, and a relative width needs the parameter’s input value, which this object does not carry.- Attributes:
- namestr
Parameter the override applies to. A bare per-file name (
F1) applies to every expansion of it (F1_0,F1_1); a full name (F1_0) applies to that one only and wins over the bare form.- shape{‘uniform’, ‘normal’}
Normalised shape name.
- relativebool
True for the
+-WIDTHform, which is centred on the parameter’s input value rather than stating absolute numbers.- argstuple of float
(low, high)or(mean, sigma)when absolute,(width,)when relative.- textstr
The original string, quoted back in error messages.
Methods Summary
is_exact(par)Whether this spec names
paroutright rather than by its bare name.matches(par)Whether this spec applies to fit parameter
par.Methods Documentation