User Tools

Site Tools


heartbeats

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
heartbeats [2010/06/14 23:33] – updated the help jochenheartbeats [2010/06/29 17:17] (current) – updated help jochen
Line 8: Line 8:
 The [[xff]] IO reading class now supports reading the following formats: The [[xff]] IO reading class now supports reading the following formats:
   * ACQ (up until version <= 3.9.7)   * ACQ (up until version <= 3.9.7)
-  * TXT (use ''<nowiki>object = xff('*.ntt');</nowiki>'' to read!)+  * TXT (use ''<nowiki>object = xff('*.ntt');</nowiki>'' or ''<nowiki>object = xff(filename, 'ntt');</nowiki>'' to read!)
 and further formats might be added based on request and urgency. and further formats might be added based on request and urgency.
 +
 +In case the data is in a different format, you must ensure to first convert into one of the formats above or into a MAT file, which then can be read used like this:
 +
 +<code matlab heartbeats_readmat.m>% load a mat file (e.g. an ACQ->MAT converted file)
 +load HPS1344_session1_ECG.mat;
 + 
 +% create new NTT (used for methods on data!)
 +ntt = xff('new:ntt');
 + 
 +% store data from mat file in ntt
 +ntt.Data = data;</code>
  
 ===== Reference (help) ===== ===== Reference (help) =====
Line 15: Line 26:
 <file>  heartbeats  - detect heart beats and frequency in physio data <file>  heartbeats  - detect heart beats and frequency in physio data
    
-  FORMAT:       [bp, bs, bf, bv, cp, wgd, wd] = heartbeats(sig [, opts])+  FORMAT:       [bp, bs, bf, bv, cp, wgd, wd, hrv] = heartbeats(sig [, opts])
    
   Input fields:   Input fields:
Line 23: Line 34:
          .badt      t-threshold for detecing irregularity (default: 25)          .badt      t-threshold for detecing irregularity (default: 25)
          .bppre     pre-defined positions (no detection, only inspection)          .bppre     pre-defined positions (no detection, only inspection)
 +         .calc      preprocessing calculcation, one of
 +                    {'none'} - don't to anything (default)
 +                    {'absdiff'} - use abs(diff(data))
 +                        if .detlength is not given, will be set to 0.02
 +                        if .skewdt is not given, will be set to 0.1
 +                    {'diffsq'} - square the diff of the data
 +                        if .detlength is not given, will be set to 0.01
 +                        if .skewdt is not given, will be set to 0.05
 +                    {'fourthz'} - fourth power of the z-transformed data
 +                        if .detlength is not given, will be set to 0.02
 +                        if .skewdt is not given, will be set to 0.04
 +                    {'squarez'} - square the z-transformed data
 +                        if .detlength is not given, will be set to 0.03
 +                        if .skewdt is not given, will be set to 0.1
 +                    {'thirdz'} - third power of the abs z-transformed data
 +                        if .detlength is not given, will be set to 0.02
 +                        if .skewdt is not given, will be set to 0.06
          .cleanup   interactive cleanup (default: false)          .cleanup   interactive cleanup (default: false)
          .detlength detection length threshold in seconds (default: 0.05)          .detlength detection length threshold in seconds (default: 0.05)
 +         .freq      data frequency in Hz (default: 1000)
          .pflength  pre-filter length in seconds (default: 0.025)          .pflength  pre-filter length in seconds (default: 0.025)
          .pfreps    pre-filter repetitions (default: 2)          .pfreps    pre-filter repetitions (default: 2)
-         .freq      data frequency in Hz (default: 1000) 
          .plot      plot mean +/- std estimate of signal (default: false)          .plot      plot mean +/- std estimate of signal (default: false)
-         .plotfreq  samples per second to plot+         .plotfreq  samples per second to plot (default: 50)
          .plotwin   plot window size in seconds (default: 6)          .plotwin   plot window size in seconds (default: 6)
 +         .resfreq   resample data prior to detection (default: [])
          .segsize   segmentation size in seconds (default: 5)          .segsize   segmentation size in seconds (default: 5)
          .segstep   stepping (window shift) in seconds (default: 1)          .segstep   stepping (window shift) in seconds (default: 1)
          .skewdt    skewness detection threshold multiplier (default: 0.5)          .skewdt    skewness detection threshold multiplier (default: 0.5)
-         .windsor   windsorizing threshold in std's (default: 3)+         .winsor    winsorizing threshold in std's (default: 3)
    
   Output fields:   Output fields:
Line 45: Line 74:
         wgd         guess whether window is good or not         wgd         guess whether window is good or not
         wd          windowed data (in 100Hz resolution, interpolated)         wd          windowed data (in 100Hz resolution, interpolated)
 +        hrv         output of computehrv(bp)
    
-  Note: this function is still preliminary</file>+  Note: this function is still preliminary, other options passed on to 
 +        computehrv (if 8th output is requested), with .hrvrfreq being 
 +        set to .resfreq</file>
  
 ===== Usage overview ===== ===== Usage overview =====
heartbeats.txt · Last modified: 2010/06/29 17:17 by jochen