Parameter

class gdt.core.data_primitives.Parameter(value, uncert, name='', units=None, support=(- inf, inf))[source]

Bases: object

A fit parameter class

Parameters:
  • value (float) – The central fit value

  • uncert (float or 2-tuple) – The 1-sigma uncertainty. If a 2-tuple, then is of the form (low, high)

  • name (str, optional) – The name of the parameter

  • units (str, optional) – The units of the parameter

  • support (2-tuple, optional) – The valid support of the parameter

Attributes Summary

name

The name of the parameter

support

The valid support of the parameter

uncertainty

The 1-sigma uncertainty

units

The units of the parameter

value

The central fit value

Methods Summary

one_sigma_range()

Return the 1 sigma range of the parameter fit

to_fits_value()

Return as a tuple to be used for a FITS file

valid_value()

Check if the parameter value is within the allowed parameter range

Attributes Documentation

name

The name of the parameter

Type:

(str)

support

The valid support of the parameter

Type:

(2-tuple)

uncertainty

The 1-sigma uncertainty

Type:

(float, float)

units

The units of the parameter

Type:

(str)

value

The central fit value

Type:

(float)

Methods Documentation

one_sigma_range()[source]

Return the 1 sigma range of the parameter fit

Returns:

(tuple) – 2-tuple (low, high)

to_fits_value()[source]

Return as a tuple to be used for a FITS file

Returns:

(tuple) – 3-value tuple (value, +uncertainty, -uncertainty)

valid_value()[source]

Check if the parameter value is within the allowed parameter range

Returns:

(bool)