S5.Tecplot.DSWinput#
- class S5.Tecplot.DSWinput(filename: str | None = None)[source]#
Bases:
object
Repersent DSW input file such as LogVolts.in or SolarSim.in.
Examples
>>> control_file = DSWinput('SolarSim.in')
Methods
__init__
([filename])format
(sysformat)Reformat the input file, changing path refrence to either windows
\
or linux/
.get_value
(param)Get the values of the parameter.
readfile
(filename)Read in the input file.
set_value
(param, value)Set the value of the parameter.
write_input
(filename)Write input file to a file.
- format(sysformat: str) None [source]#
Reformat the input file, changing path refrence to either windows
\
or linux/
.- Parameters:
sysformat – System to format to (‘lin’ , ‘win’).
- Returns:
None
Examples
>>> control_file = DSWinput.readfile('SolarSim.in') >>> control_file.format('lin') >>> control_file.format('win')
- get_value(param: str) str [source]#
Get the values of the parameter.
- Parameters:
param – Name of the parameter to get the value of.
- Returns:
Value of parameter as string.
Examples
>>> control_file = DSWinput.readfile('SolarSim.in') >>> control_file.get_value('RoadFile')
- readfile(filename: str)[source]#
Read in the input file.
- Parameters:
filename – File name of the file to read in.
- Returns:
A DSWinput object representing the file that was read.
Examples
>>> control_file = DSWinput.readfile('SolarSim.in')
- set_value(param: str, value: str | float)[source]#
Set the value of the parameter.
- Parameters:
param – Name of the parameter to set the value off.
value – Value to set the parameter to.
- Returns:
None
- Raises:
ValueError if the parameter is not in the input file. –
Examples
>>> control_file = DSWinput.readfile('SolarSim.in') >>> control_file.set_value('RadoFile','RoadWSC.dat')