parse_prior_spec

ell1fit.priors.parse_prior_spec(text)[source]

Parse one NAME:SHAPE:ARGS prior override.

Parameters:
textstr

For example F1:uniform:-1e-10,1e-10 (absolute bounds), F1:uniform:+-1e-10 (input value plus or minus a width), PB:normal:16003.2,0.5 or TASC:normal:+-1e-6.

Returns:
PriorSpec
Raises:
ValueError

For any malformed spec. Nothing is guessed: a prior that silently became something other than what was asked for would change the answer and leave no trace in the output.