polyfemos.back.parameter.Parameter — polyfemos 0.3.29 documentation

# polyfemos.back.parameter.Parameter

class `polyfemos.back.parameter.` `Parameter`(class_='', name='', code='', decimation_factor=1, scale=0.0, unit='', plotlims=[], priority=0, alertfunc=None, irlims=[], alertlims=[], path=None)

  Bases: `object`

  A state of health parameter class

  Public Methods

  `__init__`(class_='', name='', code='', decimation_factor=1, scale=0.0, unit='', plotlims=[], priority=0, alertfunc=None, irlims=[], alertlims=[], path=None)
    Parameters

      - class_ (str) – arbitrary string defining the class of the parameter

      - name (str) – name of the parameter, e.g. ‘Digitizer_input_voltage’

      - code (str) – code of the parameter, e.g. ‘HHZ.DCL’

      - decimation_factor (int) – The data of the parameter is decimated according to this value.

      - scale (float) – the data values of the parameter are with the given `scale`

      - unit (str) – unit of the parameter values after scaling

      - plotlims (list) – list of two numbers, lower and higher limits for plotting

      - priority (numlike) – priority of the parameter, smaller numbers correspond to a higher priority

      - alertfunc (func) – see `get_tibs()` for more info

      - irlims (list) – list of two numbers, lower and higher limit defining interval where the data values considered reasonable, the interval includes both endpoints.

      - alertlims (list) – a list (at most 6 entries) defining different alert stages, 3 entries for lower and higher limits. for example: `[3,5,2,6,1,NaN]`, `[red_lower, red_higher, yellow_lower, ...]`

      - path (func) – A filepath function returning datafile paths for the parameter

  `create_alertfunc`(alertfunc)

    The resulting class attribute `self.alertfunc` is decorated with `NaN2None()`

    Parameters

      alertfunc (func) – If `alertfunc` is `None`, `self.alertfunc` is set to always return `False`

  `create_header_field`(field)
    Parameters

      field (str) –

    Return type

      str

    Returns

      a string combining the parameter name and the header field.

  `generate_header`()
    Return type

      generator

    Returns

      A generator yielding ‘*.stf’ file header lines

  Special Methods

  `__getitem__`(key)
    Parameters

      key (str) – name of the class attribute

    Return type

    Returns

      value of the class attribute `key`, if `key` is not an attribute, return `None`

  `__str__`()
    Return type

      str

    Returns

      somekind of string representation of the parameter