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

(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)

Methods Summary

free() make a paramter free
freeze() freezes a paramter
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
set(*args, **keywords) 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

Methods Documentation

free()[source]

make a paramter free

freeze()[source]

freezes a paramter

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
set(*args, **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