ModelParameter#

class jetset.model_parameters.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

adimensional

Adimensional.

fit_range

Fit range.

frozen

Frozen.

immutable

Immutable.

islog

Islog.

linked

Linked.

par_expr

Par expr.

par_expression_source_code

Par expression source code.

units

Units.

val

Val.

val_lin

Val lin.

val_log

Val log.

Methods Summary

free()

make a parameter free

freeze()

freezes a parameter

get(*args)

Get.

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

Identity func.

reset_dependencies()

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)

To.

Attributes Documentation

adimensional#

Adimensional.

Returns:

Requested value.

Return type:

object

fit_range#

Fit range.

Returns:

Requested value.

Return type:

object

frozen#

Frozen.

Returns:

Requested value.

Return type:

object

immutable#

Immutable.

Returns:

Requested value.

Return type:

object

islog#

Islog.

Returns:

Requested value.

Return type:

object

linked#

Linked.

Returns:

Requested value.

Return type:

object

par_expr#

Par expr.

Returns:

Requested value.

Return type:

object

par_expression_source_code#

Par expression source code.

Returns:

Requested value.

Return type:

object

units#

Units.

Returns:

Requested value.

Return type:

object

val#

Val.

Returns:

Requested value.

Return type:

object

val_lin#

Val lin.

Returns:

Requested value.

Return type:

object

val_log#

Val log.

Returns:

Requested value.

Return type:

object

Methods Documentation

free()[source]#

make a parameter free

freeze()[source]#

freezes a parameter

get(*args)[source]#

Get.

Parameters:

*args (tuple) – Additional positional arguments.

Returns:

Computed result.

Return type:

object

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]#

Identity func.

Returns:

Computed result.

Return type:

object

reset_dependencies()[source]#

Reset dependencies.

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]#

To.

Parameters:

units (object) – Parameter controlling units.

Returns:

Computed result.

Return type:

object