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

Determine Klotz curve from (EDV,EDP) pair. More...

Functions

def parser ()
 
def file_dump (vdat, pdat)
 

Variables

float MMHG2KPA = 0.133322387415
 
float KPA2MMHG = 1.0 / MMHG2KPA
 
float EDVDEFAULT = 110.0
 
float EDPDEFAULT = 10.0
 
 xrange = range
 
def opts = parser().parse_args()
 
 pvtraces = None
 
 csv_file
 
 ttrace = csv_file[:,0].astype('float')
 
 l_index = np.where(ttrace > 0)[0][0]
 
 ptrace = csv_file[:,1].astype('float')[0:l_index]
 
 vtrace = csv_file[:,2].astype('float')[0:l_index]
 
 silent
 
 plot
 
def EDV = vtrace[-1] if opts.EDV is None else opts.EDV
 
tuple EDP = (ptrace[-1] if opts.EDP is None else opts.EDP) * (1.0 if opts.kPa else MMHG2KPA)
 
 P = kl.KlotzRelation(EDV, EDP)
 
float max_vol = kl.V30(EDV,EDP)*1.1 if pvtraces is None else EDV
 
 vdat = np.linspace(0, max_vol, 100)
 
 pdat = P(vdat)
 
 fig = pyplot.figure()
 
 ax = fig.add_subplot(1,1,1)
 
 label
 
 c
 
 marker
 
 loc
 

Detailed Description

Determine Klotz curve from (EDV,EDP) pair.

Function Documentation

◆ file_dump()

def bin.klotz.file_dump (   vdat,
  pdat 
)

◆ parser()

def bin.klotz.parser ( )

Variable Documentation

◆ ax

bin.klotz.ax = fig.add_subplot(1,1,1)

◆ c

bin.klotz.c

◆ csv_file

bin.klotz.csv_file
Initial value:
1 = np.loadtxt(pvtrace[i], dtype=str, skiprows=1, comments='#',
2  delimiter=',')

◆ EDP

tuple bin.klotz.EDP = (ptrace[-1] if opts.EDP is None else opts.EDP) * (1.0 if opts.kPa else MMHG2KPA)

◆ EDPDEFAULT

float bin.klotz.EDPDEFAULT = 10.0

◆ EDV

float bin.klotz.EDV = vtrace[-1] if opts.EDV is None else opts.EDV

◆ EDVDEFAULT

float bin.klotz.EDVDEFAULT = 110.0

◆ fig

bin.klotz.fig = pyplot.figure()

◆ KPA2MMHG

float bin.klotz.KPA2MMHG = 1.0 / MMHG2KPA

◆ l_index

bin.klotz.l_index = np.where(ttrace > 0)[0][0]

◆ label

bin.klotz.label

◆ loc

bin.klotz.loc

◆ marker

bin.klotz.marker

◆ max_vol

float bin.klotz.max_vol = kl.V30(EDV,EDP)*1.1 if pvtraces is None else EDV

◆ MMHG2KPA

float bin.klotz.MMHG2KPA = 0.133322387415

◆ opts

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

◆ P

bin.klotz.P = kl.KlotzRelation(EDV, EDP)

◆ pdat

bin.klotz.pdat = P(vdat)

◆ plot

bin.klotz.plot

◆ ptrace

bin.klotz.ptrace = csv_file[:,1].astype('float')[0:l_index]

◆ pvtraces

list bin.klotz.pvtraces = None

◆ silent

bin.klotz.silent

◆ ttrace

bin.klotz.ttrace = csv_file[:,0].astype('float')

◆ vdat

bin.klotz.vdat = np.linspace(0, max_vol, 100)

◆ vtrace

bin.klotz.vtrace = csv_file[:,2].astype('float')[0:l_index]

◆ xrange

bin.klotz.xrange = range