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:50 2007
Get Events

3.6. Get Events

The example will show how to get values associated with an event. We will perform the following steps:

  • get RR intervals and the postion of the QRS-complexes

  • plot the tachogram of the measurement

rasch@rasch:~> octave
GNU Octave, version 2.1.50 (i686-pc-linux-gnu).
...

octave:1> ra=ra_lib_init
ra = 145018424
octave:2> meas=ra_meas_open(ra, '/home/rasch/ecgs/AT011030_rdi.ART', 0)
meas = 145245184
octave:3> eva=ra_eval_get_def(meas)
eva = 145612904
octave:4> prop_rri=ra_prop_get_by_name(eva, 'rri')
prop_rri = 145667632
octave:5> rri=ra_ev_get_values(prop_rri, 0, -1); (1)
octave:6> whos rri

*** local user variables:

prot  type                       rows   cols  name
====  ====                       ====   ====  ====
 rwd  matrix                        1   1807  rri

octave:7> prop_qrs=ra_prop_get_by_name(eva, 'qrs-pos')
prop_qrs = 145613912
octave:8> qrs_pos=ra_ev_get_values(prop_qrs, 0, -1);
octave:9> whos qrs_pos

*** local user variables:

prot  type                       rows   cols  name
====  ====                       ====   ====  ====
 rwd  matrix                        1   1807  qrs_pos

octave:10> samplerate=ra_meas_get_info(meas, 'max_samplerate')
samplerate = 1600
octave:11> x=(qrs_pos/samplerate) / 60;
octave:12> plot(x, rri)
octave:13>
(1)

Figure 3-2 shows a screenshot of Octave after performing the above steps.

Figure 3-2. Screenshot after performing the commands in Octave as shown in the Octave session above (and on the left side in the screenshot).