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
Next revisionBoth sides next revision
heartbeats [2010/05/28 03:05] – typo jochenheartbeats [2010/05/28 03:14] – typo jochen
Line 2: Line 2:
  
 ===== Motivation ===== ===== Motivation =====
-For many tasks, it is often helpful to collect secondary physiological measurements, such as heart-rate over time. The data processing can be rather complicated.+For many experimental tasks (e.g. subjects follwing a set of specific but differing instructions), it is often helpful to collect secondary physiological measurements, such as heart-rate over time (both as a manipulation check but also as potential candidates for mediation analysis). The data processing can be rather complicated, and a function to automatize the actual detection of heart beats in the ECG data is helpful.
  
 ===== Requirements ===== ===== Requirements =====
Line 53: Line 53:
   * segment-wise beat detection (maximum value position within each sub-segment where value > mean + 0.5 * skew)   * segment-wise beat detection (maximum value position within each sub-segment where value > mean + 0.5 * skew)
  
-Next, the detected (or provided) beats will be displayed in a small dialog for places where either the distance between beats is too small or too large (and the shape of the detected beat does not match the mean signature):+Next, the detected (or provided) beats will be analyzed, and any irregularities (that is to say, places where either the distance between beats is too small or too large or the shape of the detected beat does not match the mean signature) will be displayed, one by one, in a small dialog:
  
 {{:heartbeats_cleanup.png|heartbeats cleanup dialog}} {{:heartbeats_cleanup.png|heartbeats cleanup dialog}}
Line 62: Line 62:
   * once all beats in this window are correct, press the accept button   * once all beats in this window are correct, press the accept button
  
-If no more bad beats are in the list, the dialog will close automatically. If you wish, you can also manually close the dialog (prematurely) to go on to the next stage.+If no more irregularities remain to be checked, the dialog will close automatically. If you wish, you can also manually close the dialog (prematurely) to go on to the next stage.
  
 In case the plotting has been enabled, the following two displays appear: In case the plotting has been enabled, the following two displays appear:
  
-{{:ecg_and_hr_overview.png|heartbeats plot figure 1}}+{{:mean_ecg_signal.png|heartbeats plot figure 1}}
  
-and+This first figure simply shows a representation of the mean (each window is re-sampled to match a 100-sample window length) and the standard deviation, whereas the X-axes is labeled as phase with the peak being located at 0. This display can be helpful in fine-tuning some of the parameters for the function (e.g. the detection length threshold).
  
-{{:mean_ecg_signal.png|heartbeats plot figure 2}}+{{:ecg_and_hr_overview.png|heartbeats plot figure 2}}
  
-The second figure simply shows a representation of the mean (each window is re-sampled to match a 100-sample window length), whereas the X-axes is labeled as phase with the peak being located at 0.+The second figure shows the entire signal over time in 20Hz sampling (in blue) with the detected heart-rate (which is rescaled to 2.5 + BPM/60super-imposed to control for flaws in the (initial auto-) detectionThis can be done by zooming in on a smaller piece of the signal:
  
-The first figure shows the entire signal over time in a 20Hz sampling (in blue) with the detected heart-rate super-imposed to control for flaws in the detectionThis can be done by zooming in on a smaller piece of the signal:+{{:ecg_and_hr_zoomed.png|heartbeats plot figure zoomed}}.
  
-{{:ecg_and_hr_zoomed.png|heartbeats plot figure 1 zoomed}}+===== Scripting ===== 
 +Naturally, it is possible to script this function, save the pre-detected heartbeats (without manual interaction/plotting) and then, at a later time, revisit the inspection (for instance, if several subjects' datasets are to be examined, it usually is preferable to perform the extraction and detection of all datasets prior to engaging in the fine tuning).
  
heartbeats.txt · Last modified: 2010/06/29 17:17 by jochen