PriorSpec

class ell1fit.priors.PriorSpec(name, shape, relative, args, text=None)[source]

Bases: object

One 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: F1 has to be matched to the per-file F1_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 +-WIDTH form, 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 par outright rather than by its bare name.

matches(par)

Whether this spec applies to fit parameter par.

Methods Documentation

is_exact(par)[source]

Whether this spec names par outright rather than by its bare name.

matches(par)[source]

Whether this spec applies to fit parameter par.

Uses the same bare-name convention as ell1fit.pipeline._collect_parameter_names(): F1 covers F1_0, F1_1, … as well as a global F1.