polyfemos.back.filewriter — polyfemos 0.3.29 documentation

# polyfemos.back.filewriter

Contains classes for writing state of health files

copyright

  2019, University of Oulu, Sodankyla Geophysical Observatory

license

  GNU Lesser General Public License v3.0 or later (https://spdx.org/licenses/LGPL-3.0-or-later.html)

Public Functions

`polyfemos.back.filewriter.` `create_csvline`(values, *args)
  Parameters

    values (list) – 2-3 value list, [timevalue, y, z]

  Return type

    list

  Returns

    row for ‘*.csv’ file, the timevalue is replaced with the corresponding timestamp

`polyfemos.back.filewriter.` `create_stfline`(values, parname, *args)
  Parameters

    - values (list) – 2-3 value list, [timevalue, y, z]

    - parname (str) – parameter name

  Return type

    str

  Returns

    line for ‘*.stf’ file following the soh text file format

`polyfemos.back.filewriter.` `get_alert_header`(*args)
  Return type

    list

  Returns

    soh alert file header as list of strings

`polyfemos.back.filewriter.` `get_csv_header`(unit, *args)
  Parameters

    unit (str) – unit of the parameter values

  Return type

    list

  Returns

    soh csv file header as list of strings

Private Functions

`polyfemos.back.filewriter.` `_check_bool`(method)

  A decorator to be used with `FileWriter`. The call of the decorated method is omitted if `self._bool` attribute is `False`.

  Parameters

    method (func) – A decorated method

  Return type

    func

  Returns

Classes

`AlertWriter`(*args, **kwargs) | State of health alert file (‘*.alert’) writer
`CSVWriter`(*args, **kwargs) | State of health csv file (‘*.csv’) writer
`FileWriter`([bool_, fp_func, retroactive]) | Parent class for state of health file writer classes
`STFWriter`(*args, **kwargs) | State of health text file (‘*.stf’) writer