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

Create a HDF5 repository file for the ionic models in LIMPET. 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 cpu_time ()
 
def read_sv_dump (filename, is_bigendian, type, dsize, numSamps)
 Read state variables from binary file. 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_dumps (flst)
 
def openCARP_dtype (carp_dtype, carp_dsize)
 Determine openCARP data type. More...
 
def createTblDesc (fileList)
 Create and return an instance of Description class which will be used to describe the structure of the table for the hdf5 file. More...
 
def dump2hdf5 (headerFile, h5File, whitelist=None)
 Function to create a repository based on a header created with LIMPET/bench. More...
 
def main ()
 

Variables

string epilog
 
 xrange = range
 

Detailed Description

Create a HDF5 repository file for the ionic models in LIMPET.

Function Documentation

◆ cpu_time()

def bin.bin2h5.cpu_time ( )

◆ createTblDesc()

def bin.bin2h5.createTblDesc (   fileList)

Create and return an instance of Description class which will be used to describe the structure of the table for the hdf5 file.

◆ dump2hdf5()

def bin.bin2h5.dump2hdf5 (   headerFile,
  h5File,
  whitelist = None 
)

Function to create a repository based on a header created with LIMPET/bench.

◆ main()

def bin.bin2h5.main ( )

◆ openCARP_dtype()

def bin.bin2h5.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.bin2h5.parser ( )

◆ read_sv_dump()

def bin.bin2h5.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.bin2h5.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.

◆ read_sv_dumps()

def bin.bin2h5.read_sv_dumps (   flst)

Variable Documentation

◆ epilog

string bin.bin2h5.epilog
Initial value:
1 = """
2 (c) Bernardo M. Rocha <bernardomartinsrocha@gmail.com> and
3  Gernot Plank <gernot.plank@medunigraz.at>
4 """

◆ xrange

bin.bin2h5.xrange = range