coexist.create_parameters#
- coexist.create_parameters(variables=[], minimums=[], maximums=[], values=None, sigma=None, **kwargs)[source]#
Create a
pandas.DataFrame
storingAccess
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 deviationsigma
is set to 40% of this range, so that the entire space is explored.- Parameters:
- variables
list
[str
],default
[] A list of the free parameters’ names.
- minimums
list
[float
],default
[] A list with the same length as
variables
storing the lower bound for each corresponding variable.- maximums
list
[float
],default
[] A list with the same length as
variables
storing 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
minimums
andmaximums
.- sigma
list
[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.- **kwargs
other
keyword
arguments
Other columns to include in the returned parameters DataFrame, given as other lists with the same length as
variables
.
- variables
- Returns:
pandas.DataFrame
A table storing the intial
value
,min
,max
andsigma
(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