pytrnsys_process.config package#
Submodules#
pytrnsys_process.config.constants module#
- class pytrnsys_process.config.constants.PlotSizes(*values)[source]#
Bases:
Enum- A4 = (7.8, 3.9)#
- A4_HALF = (3.8, 3.9)#
- class pytrnsys_process.config.constants.FilePattern(patterns: list[str], prefix: str)[source]#
Bases:
object
- class pytrnsys_process.config.constants.FileType(*values)[source]#
Bases:
Enum- MONTHLY = FilePattern(patterns=['_mo_', '_mo$', '^mo_'], prefix='mo_')#
- HOURLY = FilePattern(patterns=['_hr_', '_hr$', '^hr_'], prefix='hr_')#
- TIMESTEP = FilePattern(patterns=['_step_', '_step$', '^step_'], prefix='step_')#
- HYDRAULIC = FilePattern(patterns=['_mfr_', '_mfr$', '_t$'], prefix='step_')#
- DECK = '.dck'#
pytrnsys_process.config.settings module#
- class pytrnsys_process.config.settings.Plot(file_formats: ~collections.abc.Sequence[str] = <factory>, figure_sizes: dict[str, tuple[float, float]] = <factory>, inkscape_path: str = 'C://Program Files//Inkscape//bin//inkscape.exe', date_format: str = '%b %Y', label_font_size: int = 10, legend_font_size: int = 8, title_font_size: int = 12, markers: ~collections.abc.Sequence[str] = <factory>)[source]#
Bases:
objectClass holding the global settings for plots.
- figure_sizes#
Dictionary of figure sizes to save to file. By default these the ‘A4 plot’ will fit horizontally on an A4 page. Two of the ‘half A4 plot’ can fit horizontally on an A4 page.
- inkscape_path:
Path to the installation of Inkscape. This is required to save plots to the EMF format.
- date_format:
Formatting to use when plotting datetimes.
- __init__(file_formats: ~collections.abc.Sequence[str] = <factory>, figure_sizes: dict[str, tuple[float, float]] = <factory>, inkscape_path: str = 'C://Program Files//Inkscape//bin//inkscape.exe', date_format: str = '%b %Y', label_font_size: int = 10, legend_font_size: int = 8, title_font_size: int = 12, markers: ~collections.abc.Sequence[str] = <factory>) None#
- class pytrnsys_process.config.settings.Reader(folder_name_for_printer_files: str = 'temp', read_step_files: bool = False, read_deck_files: bool = True, force_reread_prt: bool = False, starting_year: int = 2024)[source]#
Bases:
objectClass holding global settings for the reading files.
- folder_name_for_printer_files#
Name of the data folder inside the simulation directly (Default: ‘temp’)
- Type:
- starting_year#
The reader will use this to set the year in which the data starts in the datetime index.
- Type:
- class pytrnsys_process.config.settings.Settings(plot: Plot, reader: Reader)[source]#
Bases:
objectClass holding the global settings for processing.
- class pytrnsys_process.config.settings.Defaults(*values)[source]#
Bases:
EnumDefault settings for different use cases
- DEFAULT = Settings(plot=Plot(file_formats=['.png', '.pdf', '.emf'], figure_sizes={'A4': (7.8, 3.9), 'A4_HALF': (3.8, 3.9)}, inkscape_path='C://Program Files//Inkscape//bin//inkscape.exe', date_format='%b %Y', label_font_size=10, legend_font_size=8, title_font_size=12, markers=['x', 'o', '^', 'D', 'v', '<', '>', 'p', '*', 's']), reader=Reader(folder_name_for_printer_files='temp', read_step_files=False, read_deck_files=True, force_reread_prt=False, starting_year=2024))#
Module contents#
- class pytrnsys_process.config.Defaults(*values)[source]#
Bases:
EnumDefault settings for different use cases
- DEFAULT = Settings(plot=Plot(file_formats=['.png', '.pdf', '.emf'], figure_sizes={'A4': (7.8, 3.9), 'A4_HALF': (3.8, 3.9)}, inkscape_path='C://Program Files//Inkscape//bin//inkscape.exe', date_format='%b %Y', label_font_size=10, legend_font_size=8, title_font_size=12, markers=['x', 'o', '^', 'D', 'v', '<', '>', 'p', '*', 's']), reader=Reader(folder_name_for_printer_files='temp', read_step_files=False, read_deck_files=True, force_reread_prt=False, starting_year=2024))#
- class pytrnsys_process.config.PlotSizes(*values)[source]#
Bases:
Enum- A4 = (7.8, 3.9)#
- A4_HALF = (3.8, 3.9)#
- class pytrnsys_process.config.FileType(*values)[source]#
Bases:
Enum- MONTHLY = FilePattern(patterns=['_mo_', '_mo$', '^mo_'], prefix='mo_')#
- HOURLY = FilePattern(patterns=['_hr_', '_hr$', '^hr_'], prefix='hr_')#
- TIMESTEP = FilePattern(patterns=['_step_', '_step$', '^step_'], prefix='step_')#
- HYDRAULIC = FilePattern(patterns=['_mfr_', '_mfr$', '_t$'], prefix='step_')#
- DECK = '.dck'#