ModelParameterArray

class ModelParameterArray[source]

Bases: object

This class provide and interface to handle an array of ModelParameter objects.

par_array

list – list of ModelParameter objects

Methods Summary

add_par(par) adds a new ModelParameter object to the par_array
del_par(par)
freeze_all()
get(par_name, arg) gets the argument of a given parameter
get_par_by_name(name[, verbose]) selects a parameter by name
set(par_name, *args, **keywords) sets to a given value a given parameter
show_best_fit_pars([getstring]) shows the best-fit information for all the items in the par_array
show_pars([getstring]) shows the information for all the items in the par_array

Methods Documentation

add_par(par)[source]

adds a new ModelParameter object to the par_array

del_par(par)[source]
freeze_all()[source]
get(par_name, arg)[source]

gets the argument of a given parameter

Parameters:
  • par_name ((str) name of the parameter) –
  • arg (keyword) –

Examples

if parameters is a ModelParameterArray object:

get_par_by_name(name, verbose=False)[source]

selects a parameter by name

Parameters:name ((str) parameter name) –
Returns:item
Return type:the ModelParameter element of the par_array with the corresponding name
set(par_name, *args, **keywords)[source]

sets to a given value a given parameter

Parameters:
  • par_name ((str) name of the parameter) –
  • keywords (keywords to set the value or the range of the parameter) –

Examples

if parameters is a ModelParameterArray object:

show_best_fit_pars(getstring=False)[source]

shows the best-fit information for all the items in the par_array

show_pars(getstring=False)[source]

shows the information for all the items in the par_array