TUM-Logo

libRASCH

 

Home
 

General

About libRASCH/News
Design
Screen shots
Sample programs (with source code)
License
 

Download

libRASCH
Tools
 

Documentation

User
Developer
 

Resources

Mailing list
Supported Formats
Plugins
Status
Links
 
Contact
About this site
 
Last updated
Tue Mar 27 23:03:48 2007

Perl-Version of process

Sourcecode

use strict;
use RASCH;

# initialize libRASCH
my $ra = new RASCH or die "error initializing libRASCH\n";

# open measurement and get default evaluation
my $meas = $ra->open_meas($ARGV[0], 0) or
    die "can't open measurement $ARGV[0]\n";
my $eval = $meas->get_default_eval() or
    die "no evaluation in the measurement\n";

# get plugin-handle for hrv-plugin
my $pl = $ra->get_plugin_by_name('hrv') or
    die "can't find plugin 'hrv'\n";

# calculate hrv-values using the hrv-plugin
my $proc = $pl->init_process(eva => $eval) or
    die "can't initialize processing\n";
my $results = $proc->process();
# $results is a reference to an array; each array-element contains
# another array with three elements (value, name, description)
for (@$results)
{
    print $_->name() . ' (' . $_->desc() . ') = ' .
	$_->value() . "\n";
}

exit 0;

Output of the example

SDNN (standard deviation of normal-to-normal intervals) =
30.8761964330589
HRVI (HRV-Index) = 4.8
SDANN (standard deviation of averaged normal-to-normal
intervals) = nan
rmssd (root mean of squared sucsessive differences) =
33.8395373153104
pNN50 () = 7.14285714285714
TP (total power) = 482.603095556721
ULF (ultra low frequency power) = 0
VLF (very low frequency power of short-term recordings) =
32.8891498386073
LF (low frequency power) = 157.21372565195
LF_NORM (normalised low frequency power) = 34.9586058312928
HF (high freuqency power) = 292.500220066165
HF_NORM (normalised high frequency power) = 65.0413941687072
LF_HF_RATIO (LF/HF ratio) = 0.537482418359847
POWER_LAW (power law behavior) = 0
TACHO_INDEX (Event numbers used for HRV calculations) =
ARRAY(0x815add8)
USER_BAND (frequency power in a user-selected frequency band) =