pvlib.iotools.read_panond#
- pvlib.iotools.read_panond(filename, encoding=None)[source]#
Retrieve Module or Inverter data from a .pan or .ond text file, respectively.
- Parameters:
- Returns:
content (dict) – Contents of the .pan or .ond file following the indentation of the file. The value of datatypes are assumed during reading. The value units are the default used by PVsyst.
Notes
The parser is intended for use with .pan and .ond files that were created for use by PVsyst. At time of publication, no documentation for these files was available. So, this parser is based on inferred logic, rather than anything specified by PVsyst. At time of creation, tested .pan/.ond files used UTF-8 encoding.
The parser assumes that the file being parsed uses indentation of two spaces (’ ‘) to create a new level in a nested dictionary, and that key/values pairs of interest are separated using ‘=’. This further means that lines not containing ‘=’ are omitted from the final returned dictionary.
Additionally, the indented lines often contain values themselves. This leads to a conflict with the .pan/.ond file and the ability of nested a dictionary to capture that information. The solution implemented here is to repeat that key to the new nested dictionary within that new level.
The parser takes an additional step to infer the datatype present in each value. The .pan/.ond files appear to have intentially left datatype indicators (e.g. floats have ‘.’ decimals). However, there is still the possibility that the datatype applied from this parser is incorrect. In that event the user would need to convert to the desired datatype.