Prior module¶
-
class
prior.Prior(array)[source]¶ Bases:
objectStore the type of prior associated to a parameter
It takes as an optional input argument the array of the input
parametersdefined in the parameter file.The current implemented types are ‘flat’ (default), and ‘gaussian’, which expect also a mean and sigma. Possible extension would take a ‘external’, needing to read an external file to read for the definition.
The entry ‘prior’ of the dictionary
mcmc_parameterswill hold an instance of this class. It defines one main function, calleddraw_from_prior(), that returns a number within the prior volume.-
draw_from_prior()[source]¶ Draw a random point from the prior range considering the prior type
Returns: value (float) – A random sample inside the prior region
-
map_from_unit_interval(value)[source]¶ Linearly maps a value of the interval [0,1] to the parameter range.
For the sake of speed, assumes the parameter to be bound to a finite range, which should have been previously checked with
is_bound()
-