heartbeats
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
heartbeats [2010/05/28 23:44] – corrected for linebreak jochen | heartbeats [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 ''< | + | * TXT (use ''< |
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 HPS1344_session1_ECG.mat; | ||
+ | |||
+ | % create new NTT (used for methods on data!) | ||
+ | ntt = xff(' | ||
+ | |||
+ | % store data from mat file in ntt | ||
+ | ntt.Data = data;</ | ||
===== Reference (help) ===== | ===== Reference (help) ===== | ||
Line 15: | Line 26: | ||
< | < | ||
- | FORMAT: | + | FORMAT: |
Input fields: | Input fields: | ||
Line 23: | Line 34: | ||
| | ||
| | ||
+ | | ||
+ | {' | ||
+ | {' | ||
+ | if .detlength is not given, will be set to 0.02 | ||
+ | if .skewdt is not given, will be set to 0.1 | ||
+ | {' | ||
+ | if .detlength is not given, will be set to 0.01 | ||
+ | if .skewdt is not given, will be set to 0.05 | ||
+ | {' | ||
+ | if .detlength is not given, will be set to 0.02 | ||
+ | if .skewdt is not given, will be set to 0.04 | ||
+ | {' | ||
+ | if .detlength is not given, will be set to 0.03 | ||
+ | if .skewdt is not given, will be set to 0.1 | ||
+ | {' | ||
+ | if .detlength is not given, will be set to 0.02 | ||
+ | if .skewdt is not given, will be set to 0.06 | ||
| | ||
| | ||
+ | | ||
| | ||
| | ||
- | | ||
| | ||
+ | | ||
| | ||
+ | | ||
| | ||
| | ||
- | .windsor | + | .skewdt |
+ | | ||
Output fields: | Output fields: | ||
Line 43: | 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 | ||
- | Note: this function is still preliminary</ | + | Note: this function is still preliminary, other options passed on to |
+ | computehrv (if 8th output is requested), with .hrvrfreq being | ||
+ | set to .resfreq</ | ||
===== Usage overview ===== | ===== Usage overview ===== | ||
Line 110: | Line 144: | ||
Naturally, it is possible to script this function, save the pre-detected heartbeats (without manual interaction/ | Naturally, it is possible to script this function, save the pre-detected heartbeats (without manual interaction/ | ||
+ | For instance, if the raw signal looks like this | ||
+ | |||
+ | {{: | ||
+ | |||
+ | A two-pass detection scheme can be employed: | ||
+ | |||
+ | <code matlab heartbeats_crisp_detection.m> | ||
+ | data = xff(' | ||
+ | |||
+ | % then z-transform the third column (in our case) and take the 4th power | ||
+ | pdata = ztrans(data.Data(:, | ||
+ | |||
+ | % pre-detect beats | ||
+ | % since we used the 4th power, the skew detection threshold must be lowered | ||
+ | % and our signal has short spikes, so the detection length threshold also! | ||
+ | bp = heartbeats(pdata, | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | |||
+ | % then pass this along with the actual signal back in | ||
+ | [bp, bs, bf, bv, cp, wgd, wd] = heartbeats(data.Data(:, | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' |
heartbeats.1275090254.txt.gz · Last modified: 2010/05/28 23:44 (external edit)