Heartprints: A Dynamical Portrait of Cardiac Arrhythmia --------------------------------------------------------- As part of an effort to better visualize and understand the dynamics of cardiac arrhythmias with frequent ventricular ectopy, we have developed a new representational technique termed "heartprints." These heartprints are a combination of seven histograms generated from an annotated record of heartbeat time intervals. Figure: Example of a heartprint, taken from Fig.2 in Ref. [PRE] (e.g. fig2c.eps) The three top histograms are computed over the entire Holter recording. On the top left is the histogram of the time intervals between consecutive premature ventricular (V)-beats [V-V intervals]. In the middle is the histogram of the number of intervening normal (N) beats between consecutive V-beats [NIB]. On the top right is the histogram of the coupling intervals, defined as the interval between a V-beat and the preceding normal beat. Immediately below, we show three panels which contain the dependence of the V-V intervals, the NIBs, and the coupling intervals, respectively, on the underlying normal sinus rhythm. The panels are arranged such that the x-axes of the top figures match those of the bottom figures. The underlying sinus rhythm cannot be read off the record if many ventricular beats are present. In that case the normal rhythm is reconstructed by replacing the V-beats by normal beats. (More details on this process are given at the beginning file scatter.c. Note that the quality of this reconstruction determines the reliability of the resulting figures.) Using the reconstructed normal rhythm, we collect all stretches of data where the underlying normal RR-intervals are within the same range. Then we compute the histograms of the V-V intervals, the NIBs, and the coupling intervals for normal RR-interval and plot them against the normal sinus beat time intervals. The peaks in the histograms are now represented in a gray scale where a darker shading represents more events. On the bottom left we show a histogram of the reconstructed RR-intervals of the underlying sinus rhythm. The patterns apparent in these heartprints may reveal the dynamics of the underlying mechanism. Details are found in [PRE]. Generation of Heartprints ---------------------------- There are two steps. 1. Generate a file, for example using scatter.c, which contains the V-V intervals, the NIBs, the coupling intervals, and the corresponding time intervals between reconstructed normal beats (N-N intervals). This file also contains a histogram of the reconstructed N-N intervals. The generation of this file is NOT fully automatic. If done with hp_scatter.c it may require the adjustment of threshold values when replacement non-normal beats, especially if other types of heartbeats occur. 2. Generate heartprint using hp_rrlist, this step is automatic. Uses hp_hist to generate the histograms, and uses plt for the graphics. 1.) Generate file which contains V-V time intervals, NIBs, coupling intervals and the interpolated N-N intervals. This file is to be read from hp_hist The file has the following structure: First, in two columns, the histogram of the reconstructed normal RR-intervals: in the first column is the RR-interval, in the second column is count. Then a 5-column part. For each V-beat there is one row that gives in the first column the coupling interval, in the second column the time interval between this V-beat and the following one, in the third column the NIB between this V-beat and the following one. In the fourth column is the reconstructed RR-interval of the underlying normal beats, averaged over some beats if desired. In the fifth column is the number of the beats (this column is not necessary). The file may be generated using scatter.c. Compile with 'cc -lm -O -o scatter scatter.c' and use the following command: 'scatter file_name NN_min NN_max binsize max > file_name.scatter' where NN_min is the minimum of the range of the reconstructed sinus N-N intervals NN_max is the maximum of the range of the reconstructed sinus N-N intervals binsize is 1/sampling frequency, and (NN_max-NN_min)/binsize should be integer max is the number of beats you wish to annalyze, and file_name is a file with 1. column: annotation (N=normal, V=PVC, or others) 2. column: RR interval These values are determined by the data at hand and can be found by looking at or plotting the data. The reconstruction of the normal beats is crucial, and may be difficult in the presence of many V-beats, especially many consecutive V-beats (v-tach). scatter.c considers several cases, which are described in the program and which may have to be modified for the data at hand. In any case the replacement of the V-beats has to be checked. Therefore the replaced sinus beat intervals are printed to a file called 'NN_intervals'. next to the original intervals. Record_1 Record_2 Record_3 Record_4 NN_min 0.390625 0.625 0.468 0.390625 NN_max 1 1.3203 0.648 1 binsize 0.0087125 0.0087125 0.0087125 0.0087125 typical sample frequencies are 125, 128, 250, 500. 2.) Generates postscript file containing the heartprint Note, that the following file uses 'plt' and 'imageplt' (included with plt version 2.3 and later) to generate a postscript file. command: 'hp_rrlist INPUT -m NN_min -M NN_max -F frequency' calls hp_hist which looks for a file named 'INPUT', 'NN_min' and 'NN_max" are the minimum and maximum of the NN-interval histogram at the beginning of the input file, and 'frequency' is the sampling frequency. The following seven files will be generated, containing the histograms: INPUT.hist_Tv, INPUT.hist_nib, INPUT.hist_coup, INPUT.rrTv, INPUT.rrnib, INPUT.rrcoup, and INPUT.hist_rr.