S5.Tecplot.SSHistory#
- class S5.Tecplot.SSHistory(filename=None)[source]#
- Bases: - TecplotData- Represents a SolarSim History file. - __init__(filename=None)#
 - Methods - __init__([filename])- add_timestamp([startday, datetime_col])- Add a timestamp column with datetime. - Check the zone detail matches the DataFrame. - readfile(filename)- Read the file and load populate self.data with the contents. - summary()- return a named tuple of summary - Update the zone detail assuming a 1d data structure. - write_tecplot(filename[, datum])- Write the TecplotData to a .dat file. - add_timestamp(startday='20191013', datetime_col='DDHHMMSS')[source]#
- Add a timestamp column with datetime. - Create a timestamp column in the dataframe if the file have day and time column in the DSWSS format - Parameters:
- startday – first day of the race 
- datetime_col – column name for the timestamp 
 
 - Returns: - Examples - >>> history = SSHistory("History.dat") >>> history.add_timestamp(startday='13102019') 
 - check_zone() bool#
- Check the zone detail matches the DataFrame. - This is not an exhaustive check, but just a check to make sure that the number of rows matchs the produce of I*J*K in the Zone line. - Returns:
- True if the zone detail matches the total rows 
 - Examples - >>> velocity = TecplotData("Velocity.dat") >>> if not velocity.check_zone(): >>> print("Zone detail mismatch!!") 
 - readfile(filename: str | PathLike) None#
- Read the file and load populate self.data with the contents. :param filename: Path to datafile in Tecplot format. - Returns:
- None, data from the file is loaded into the instance as the self.data attribute 
 - Examples - >>> data = TecplotData() >>> data.readfile("Velocity.dat") 
 - update_zone_1d()#
- Update the zone detail assuming a 1d data structure. - Update the zone detail such that i = the size of the dataframe in self.data. - Examples - >>> velocity = TecplotData("Velocity.dat") >>> velocity.update_zone_1d() 
 - write_tecplot(filename, datum=False) None#
- Write the TecplotData to a .dat file. - Parameters:
- filename – Filename including extension (.dat) 
- datum – If DSW datum lines are written, default false 
 
- Returns:
- None 
 - Examples - >>> velocity = TecplotData("Velocity.dat") >>> velocity.write_tecplot("Velocity.dat")