Sourcecode
import sys
from RASCH import *
# initialize libRASCH
ra = RASCH()
if not ra:
print "can't initialize libRASCH"
sys.exit()
# open measurement and get default evaluation
meas = ra.open_meas(sys.argv[1], 0)
if not meas:
print "can't open measurement", sys.argv[1]
sys.exit()
eva = meas.get_def_eval()
if not eva:
print "no evaluation in measurement"
sys.exit()
# get plugin-handle for hrv-plugin
pl = ra.get_plugin_by_name('hrv')
if not pl:
print "can't find plugin 'hrv'"
sys.exit();
# calculate hrv-values using the hrv-plugin
proc = pl.init_process(eva=eva)
if not proc:
print "can't initialize processing"
sys.exit()
results = proc.process()
for item in results:
print item[1], "("+item[2]+") =", item[0]
Output of the example
SDNN (standard deviation of normal-to-normal intervals) =
30.8761964331
HRVI (HRV-Index) = 4.8
SDANN (standard deviation of averaged normal-to-normal
intervals) = nan
rmssd (root mean of squared sucsessive differences) =
33.8395373153
pNN50 () = 7.14285714286
TP (total power) = 482.603095557
ULF (ultra low frequency power) = 0.0
VLF (very low frequency power of short-term recordings) =
32.8891498386
LF (low frequency power) = 157.213725652
LF_NORM (normalised low frequency power) = 34.9586058313
HF (high freuqency power) = 292.500220066
HF_NORM (normalised high frequency power) = 65.0413941687
LF_HF_RATIO (LF/HF ratio) = 0.53748241836
POWER_LAW (power law behavior) = 0.0
TACHO_INDEX (Event numbers used for HRV calculations) = None
USER_BAND (frequency power in a user-selected frequency band)
= None
|