carputils
Doxygen code documentation for the python framework controlling openCARP
|
Read a single state variable (sv) file. More...
Public Member Functions | |
def | __init__ (self, filename, dtype, dsize, bigendian, nsamps=None) |
def | close (self) |
Close the file. More... | |
def | varname (self) |
Return the variable name, determined from the read file name. More... | |
def | dtype (self) |
Return the file data type. More... | |
def | data (self) |
Return the sv file contents as a numpy array. More... | |
![]() | |
def | __enter__ (self) |
def | __exit__ (self, exc_type, exc_val, exc_tb) |
Read a single state variable (sv) file.
It's unlikely that you will want to instantiate this class directly. Correctly reading an sv file requires additional information found in the header file, which is already done by :class:SVSeries
.
filename | str The filename to be read |
dtype | str The sv-header data type |
dsize | int The size, in bytes, of the data type |
bigendian | bool Whether the file is big endian |
nsamps | int, optional The number of values in the sv file |
def carputils.carpio.sv.SVFile.__init__ | ( | self, | |
filename, | |||
dtype, | |||
dsize, | |||
bigendian, | |||
nsamps = None |
|||
) |
def carputils.carpio.sv.SVFile.close | ( | self | ) |
Close the file.
def carputils.carpio.sv.SVFile.data | ( | self | ) |
Return the sv file contents as a numpy array.
def carputils.carpio.sv.SVFile.dtype | ( | self | ) |
Return the file data type.
def carputils.carpio.sv.SVFile.varname | ( | self | ) |
Return the variable name, determined from the read file name.