medeq.create_parameters#

medeq.create_parameters(variables=[], minimums=[], maximums=[], values=None, **kwargs)[source]#

Create a pandas.DataFrame storing MED free parameters’ names, bounds.

This is simply a helper returning a pandas.DataFrame with the format required by e.g. medeq.Sampling.

Only the variables, minimums and maximums are necessary. If unset, the initial values are set to halfway between the lower and upper.

Parameters
variableslist[str], default []

A list of the free parameters’ names.

minimumslist[float], default []

A list with the same length as variables storing the lower bound for each corresponding variable.

maximumslist[float], default []

A list with the same length as variables storing the lower bound for each corresponding variable.

valueslist[float], optional

The optimisation starting values; not essential as ACCES samples the space randomly anyways. If unset, they are set to halfway between minimums and maximums.

**kwargsother keyword arguments

Other columns to include in the returned parameters DataFrame, given as other lists with the same length as variables.

Returns
pandas.DataFrame

A table storing the intial value, min, max and sigma (columns) for each free parameter (rows).

Examples

Create a DataFrame storing two free parameters, specifying the minimum and maximum bounds; notice that the starting guess and uncertainty are set automatically.

>>> import coexist
>>> parameters = coexist.create_parameters(
>>>     variables = ["cor", "separation"],
>>>     minimums = [-3, -7],
>>>     maximums = [+5, +3],
>>> )
>>> parameters
            value  min  max  sigma
cor           1.0 -3.0  5.0    3.2
separation   -2.0 -7.0  3.0    4.0