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)[source]¶ 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)[source]¶ - 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 infoirlims (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)[source]¶ The resulting class attribute
self.alertfunc
is decorated withNaN2None()
- Parameters
alertfunc (func) – If
alertfunc
isNone
,self.alertfunc
is set to always returnFalse
-
generate_header
()[source]¶ - Return type
generator
- Returns
A generator yielding ‘*.stf’ file header lines
Special Methods
-