ModelParameter

class ModelParameter(**keywords)[source]

Bases: object

This class is the base class for models parameters. The following keywords arguments can be passed to the constructor

Parameters:
  • name ((str) parameter name (default='unk')) –

  • val ((float) parameter value) –

  • par_type ((str) parameter type (default='unk')) –

  • units ((str) units of the parameter, (default='No')) –

  • val_min ((float) minimum physical value) –

  • val_max ((float) maximum physical value) –

  • val_start ((float) starting value) –

  • val_last_call ((float) last call value) –

  • fit_range_min ((float) minimum boundary value for the fit) –

  • fit_range_max ((float) maximum boundary value for the fit) –

  • frozen ((bool) boolean flag for frozen parameter (default=False)) –

  • log ((bool) boolean flag for log-scale value (default=False)) –

name
Type:

(str) parameter name (default=’unk’)

val
Type:

(float) parameter value

par_type
Type:

(str) parameter type (default=’unk’)

units
Type:

(str) units of the parameter, (default=’No’)

val_min
Type:

(float) minimum physical value

val_max
Type:

(float) maximum physical value

val_start
Type:

(float) starting value

val_last_call
Type:

(float) last call value

fit_range_min
Type:

(float) minimum boundary value for the fit

fit_range_max
Type:

(float) maximum boundary value for the fit

frozen
Type:

(bool) boolean flag for frozen parameter (default=False)

log
Type:

(bool) boolean flag for log-scale value (default=False)

Attributes Summary

fit_range

frozen

immutable

islog

linked

par_expr

print_par_expr

units

val

val_lin

val_log

Methods Summary

free()

make a parameter free

freeze()

freezes a parameter

get(*args)

get_bestfit_description([nofields])

gives the value of each member of the ModelParameter objects, suited for the best-fit values

get_description([nofields])

gives the value of each member of the ModelParameter objects, except the best-fit values

get_fit_initial_value()

Gives the initial fit value of the parameter

identity_func()

reset_dependencies()

set(*args[, skip_dep_par_warning])

sets a parameter value checking for physical boundaries

set_fit_initial_value(val)

Sets the initial fit value of the parameter

show()

Prints the description of a parameter

show_best_fit()

Prints the best-fit description of a parameter

to(units)

Attributes Documentation

fit_range
frozen
immutable
islog
linked
par_expr
print_par_expr
units
val
val_lin
val_log

Methods Documentation

free()[source]

make a parameter free

freeze()[source]

freezes a parameter

get(*args)[source]
get_bestfit_description(nofields=False)[source]

gives the value of each member of the ModelParameter objects, suited for the best-fit values

Returns:

descr – a string describing all the parameter values, suited for the best-fit values

Return type:

(str)

get_description(nofields=False)[source]

gives the value of each member of the ModelParameter objects, except the best-fit values

Returns:

descr – a string describing all the parameter values, except the best-fit values

Return type:

(str)

get_fit_initial_value()[source]

Gives the initial fit value of the parameter

Returns:

val_start – the parameter initial value

Return type:

value

identity_func()[source]
reset_dependencies()[source]
set(*args, skip_dep_par_warning=False, **keywords)[source]

sets a parameter value checking for physical boundaries

Parameters: keywords of the constructor

set_fit_initial_value(val)[source]

Sets the initial fit value of the parameter

show()[source]

Prints the description of a parameter

show_best_fit()[source]

Prints the best-fit description of a parameter

to(units)[source]