coexist.create_parameters#

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

Create a pandas.DataFrame storing Access free parameters’ names, bounds, and optionally starting values and relative uncertainty.

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

Only the variables, minimums and maximums are necessary. If unset, the initial values are set to halfway between the lower and upper bounds; the initial standard deviation sigma is set to 40% of this range, so that the entire space is explored.

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.

sigmalist[float], optional

The initial standard deviation in each variable, setting how far away from the initial values the parameters will be sampled; the sampling is Gaussian. If unset, they are set to 40% of the data range (i.e. maximums - minimums) so that the entire space is initially explored. ACCES will adapt and minimise this uncertainty.

**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