medeq.create_parameters#
- medeq.create_parameters(variables=[], minimums=[], maximums=[], values=None, **kwargs)[source]#
Create a
pandas.DataFramestoringMEDfree parameters’ names, bounds.This is simply a helper returning a
pandas.DataFramewith the format required by e.g.medeq.Sampling.Only the variables, minimums and maximums are necessary. If unset, the initial
valuesare set to halfway between the lower and upper.- Parameters
- variables
list[str],default[] A list of the free parameters’ names.
- minimums
list[float],default[] A list with the same length as
variablesstoring the lower bound for each corresponding variable.- maximums
list[float],default[] A list with the same length as
variablesstoring the lower bound for each corresponding variable.- values
list[float], optional The optimisation starting values; not essential as ACCES samples the space randomly anyways. If unset, they are set to halfway between
minimumsandmaximums.- **kwargs
otherkeywordarguments Other columns to include in the returned parameters DataFrame, given as other lists with the same length as
variables.
- variables
- Returns
pandas.DataFrameA table storing the intial
value,min,maxandsigma(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