carputils
Doxygen code documentation for the python framework controlling openCARP
Classes | Functions | Variables
bin.plotTrace Namespace Reference

Plot trace files. More...

Classes

class  FileDescription
 Class to hold the information about each of the binary output files generated by LIMPET/bench which contain information about the sv. More...
 

Functions

def parser ()
 
def openCARP_dtype (carp_dtype, carp_dsize)
 Determine openCARP data type. More...
 
def read_sv_dump_header (filename)
 Reads header provided by LIMPET/bench and extracts information about the binary files to read and create the HDF5 repository. More...
 
def read_sv_dump (filename, is_bigendian, type, dsize, numSamps)
 Read state variables from binary file. More...
 
def readTrace (fname)
 

Variables

def opts = parser().parse_args()
 
def flst = read_sv_dump_header(opts.headerfile)
 
def dtype = openCARP_dtype(f.dtype, f.dsize)
 
def time = read_sv_dump(f.fname, f.isbig, dtype, f.dsize, f.numSamps)
 
def fcont = read_sv_dump(f.fname, f.isbig, dtype, f.dsize, f.numSamps)
 

Detailed Description

Plot trace files.

Function Documentation

◆ openCARP_dtype()

def bin.plotTrace.openCARP_dtype (   carp_dtype,
  carp_dsize 
)

Determine openCARP data type.

Parameters
carp_dtypestring of openCARP/LIMPET data type.
carp_dsizenumber of bytes of data type.
Returns
An string of the data type -> float or double.

◆ parser()

def bin.plotTrace.parser ( )

◆ read_sv_dump()

def bin.plotTrace.read_sv_dump (   filename,
  is_bigendian,
  type,
  dsize,
  numSamps 
)

Read state variables from binary file.

Parameters
filenamethe name of the binary file to read.
is_bigendiantrue for big endian byte order.
typeopenCARP data type -> float or double.
dsizenumber of bytes of data type.
numSampsnumber of samples.
Returns
A numpy array with the binary data of the state variable.

◆ read_sv_dump_header()

def bin.plotTrace.read_sv_dump_header (   filename)

Reads header provided by LIMPET/bench and extracts information about the binary files to read and create the HDF5 repository.

Parameters
filenamethe name of the header file to read.
Returns
An instance of FileDescription object, describing data format.

◆ readTrace()

def bin.plotTrace.readTrace (   fname)

Variable Documentation

◆ dtype

def bin.plotTrace.dtype = openCARP_dtype(f.dtype, f.dsize)

◆ fcont

bin.plotTrace.fcont = read_sv_dump(f.fname, f.isbig, dtype, f.dsize, f.numSamps)

◆ flst

def bin.plotTrace.flst = read_sv_dump_header(opts.headerfile)

◆ opts

def bin.plotTrace.opts = parser().parse_args()

◆ time

bin.plotTrace.time = read_sv_dump(f.fname, f.isbig, dtype, f.dsize, f.numSamps)