pytrnsys_process.read package#
Submodules#
pytrnsys_process.read.readers module#
- class pytrnsys_process.read.readers.ReaderBase(SKIPFOOTER: int = 24, HEADER: int = 1, DELIMITER: str = '\\s+')[source]#
Bases:
object
- class pytrnsys_process.read.readers.PrtReader(SKIPFOOTER: int = 24, HEADER: int = 1, DELIMITER: str = '\\s+')[source]#
Bases:
ReaderBase- read_hourly(hourly_file: ~pathlib.Path, starting_year: int = 1990, logger: ~logging.Logger = <Logger default_pytrnsys_process (WARNING)>) DataFrame[source]#
Read hourly TRNSYS output data from a file.
- Parameters:
hourly_file – Path to the hourly TRNSYS output file
starting_year – Year to use as the start of the simulation (default: 1990)
- Returns:
df – DataFrame with hourly data indexed by timestamp, with ‘Period’ and ‘time’ columns removed
- Return type:
- Raises:
ValueError – If the timestamps are not exactly on the hour (minutes or seconds != 0):
- read_monthly(monthly_file: ~pathlib.Path, starting_year: int = 1990, logger: ~logging.Logger = <Logger default_pytrnsys_process (WARNING)>) DataFrame[source]#
Read monthly TRNSYS output data from a file.
- Parameters:
monthly_file – Path to the monthly TRNSYS output file
starting_year – Year to use as the start of the simulation (default: 1990)
- Returns:
df – DataFrame with monthly data indexed by timestamp, with ‘Month’ and ‘time’ columns removed
- Return type:
- Raises:
ValueError – If the timestamps are not at the start of each month at midnight: (not month start or hours/minutes/seconds != 0)
- class pytrnsys_process.read.readers.HeaderReader(SKIPFOOTER: int = 24, HEADER: int = 1, DELIMITER: str = '\\s+')[source]#
Bases:
ReaderBase- NUMBER_OF_ROWS_TO_SKIP = 1#
- NUMBER_OF_ROWS = 0#
Module contents#
- class pytrnsys_process.read.PrtReader(SKIPFOOTER: int = 24, HEADER: int = 1, DELIMITER: str = '\\s+')[source]#
Bases:
ReaderBase- read_hourly(hourly_file: ~pathlib.Path, starting_year: int = 1990, logger: ~logging.Logger = <Logger default_pytrnsys_process (WARNING)>) DataFrame[source]#
Read hourly TRNSYS output data from a file.
- Parameters:
hourly_file – Path to the hourly TRNSYS output file
starting_year – Year to use as the start of the simulation (default: 1990)
- Returns:
df – DataFrame with hourly data indexed by timestamp, with ‘Period’ and ‘time’ columns removed
- Return type:
- Raises:
ValueError – If the timestamps are not exactly on the hour (minutes or seconds != 0):
- read_monthly(monthly_file: ~pathlib.Path, starting_year: int = 1990, logger: ~logging.Logger = <Logger default_pytrnsys_process (WARNING)>) DataFrame[source]#
Read monthly TRNSYS output data from a file.
- Parameters:
monthly_file – Path to the monthly TRNSYS output file
starting_year – Year to use as the start of the simulation (default: 1990)
- Returns:
df – DataFrame with monthly data indexed by timestamp, with ‘Month’ and ‘time’ columns removed
- Return type:
- Raises:
ValueError – If the timestamps are not at the start of each month at midnight: (not month start or hours/minutes/seconds != 0)
- class pytrnsys_process.read.HeaderReader(SKIPFOOTER: int = 24, HEADER: int = 1, DELIMITER: str = '\\s+')[source]#
Bases:
ReaderBase- NUMBER_OF_ROWS = 0#
- NUMBER_OF_ROWS_TO_SKIP = 1#