m29 · Complex maps: fractionation, phase mapping, rotor and driver detection
Education only. Not for diagnosis, treatment or any clinical decision.
Draft, stage 2 of 6. The derivations are written, and each equation is checked by tests in tests/test_m29_complex_maps.py. Demos, code lab, questions and the remaining sections follow in later stages (plan: docs/outlines/m29-outline.md). Nothing here has had expert review yet. Whether rotors or other drivers sustain human atrial fibrillation, and whether ablating them helps, is contested; this module teaches how the maps are computed and tested, and gives no ablation advice.
In 60 seconds
During atrial fibrillation (AF) the atrium does not activate in one clean wave, so a single activation time per site stops making sense. “Complex maps” replace it with other summaries: how fragmented the local signal is, how fast it repeats, or where each site is in its cycle (its phase). Points around which phase winds through a full cycle are phase singularities, the signature of a rotor in theory. Every one of these maps depends on processing choices and on how far apart the electrodes are, so each must be tested on data where the truth is known before its output is trusted.
From the field
Planned in the outline (docs/outlines/m29-outline.md); written in a later stage.
Derivations
Symbols used throughout. \(x(t)\) an electrogram, sampled at \(f_s\) (Hz). \(X(f)\) its Fourier transform. \(t_k\) times of detected deflections. \(\varphi\) phase (rad). \(\mathcal{H}\) the Hilbert transform. \(v\) conduction velocity and \(\mathrm{CL}\) cycle length. \(\lambda_s\) spatial wavelength. \(n\) topological charge.
Fractionation
A complex fractionated atrial electrogram (CFAE) has many deflections, or continuous activity, in place of one clean deflection per beat. Such signals were proposed as ablation targets in a large series that mapped them during AF (Nademanee et al. 2004). To compare sites, a mapping system turns “fragmented” into a number. A simple one is the mean interval between deflections detected in a window:
\[ \overline{\Delta t} = \frac{t_N - t_1}{N - 1} \tag{1}\]
for \(N\) deflections at times \(t_1 < \dots < t_N\). Shorter means more fragmented. The number depends entirely on what counts as a deflection: the filter, the detection threshold, the minimum spacing between detections and the electrode spacing. Halving the threshold can double the count of deflections in the same signal (a test checks this on a synthetic train with large and small deflections). Commercial fractionation algorithms are not reproduced here.
Key takeaways
- Fractionation indices count detected deflections; they inherit every choice made by the detector.
- Report the detector settings with any fractionation map.
Dominant frequency and organization
If activation at a site repeats roughly every \(\mathrm{CL}\), its spectrum has a peak at \(1/\mathrm{CL}\) and at harmonics. The dominant frequency (DF) is the frequency of the largest peak within a search band \([f_{\text{lo}}, f_{\text{hi}}]\):
\[ \mathrm{DF} = \arg\max_{f \in [f_{\text{lo}},\, f_{\text{hi}}]} \lvert X(f)\rvert^2 \tag{2}\]
Raw bipolar electrograms are sharp, so most of their power sits at frequencies far above the activation rate, and preprocessing is a necessary step for them (Ng et al. 2007). A common chain is band-pass filter, rectify, then low-pass filter, so that each activation becomes one smooth bump. The tests show the effect: on a regular synthetic train, DF of the preprocessed signal equals \(1/\mathrm{CL}\). The origin of this chain and the filter values used in published work: TODO(source).
DF estimates depend on unipolar versus bipolar recording, bipolar spacing, preprocessing, far-field ventricular signals and window length; in one technical study, records longer than 2 s were needed for reliable DF (Ng et al. 2007). DF tracks the activation rate only when its assumptions hold; other features of the signal can move the peak (Ng and Goldberger 2007). DF maps built from electroanatomic points have been used to locate sites of high-frequency activity during AF (Sanders et al. 2005).
How regular is the signal? Everett and colleagues defined an organization index (OI) as the area under the first four harmonic peaks divided by the total area of the spectrum (Everett et al. 2001):
\[ \mathrm{OI} = \frac{\sum_{h=1}^{4} \text{area under the peak at } h \cdot \mathrm{DF}}{\text{total spectral area}} \tag{3}\]
A perfectly periodic signal puts all its power in harmonics, so OI is near 1; irregular timing spreads power and lowers OI. The width of the band counted as “under the peak” is a choice that must be reported.
Key takeaways
- DF is the largest spectral peak after preprocessing; without preprocessing it can sit at a harmonic.
- DF depends on recording type, spacing, far-field signals and window length.
- OI measures how much power is in the harmonics of DF.
Phase
Phase places each sample on a cycle: \(0\) to \(2\pi\) per activation. The analytic signal adds the Hilbert transform of \(x\) as an imaginary part:
\[ z(t) = x(t) + i\,\mathcal{H}[x](t), \qquad \varphi(t) = \arg z(t) \tag{4}\]
For \(x = \cos\omega t\), \(\mathcal{H}[x] = \sin\omega t\), so \(z = e^{i\omega t}\) and the phase advances evenly, as the tests check. Optical recordings of transmembrane voltage give smooth, nearly periodic signals, and phase maps built from them showed phase singularities during fibrillation (Gray et al. 1998).
Contact electrograms are different. For unipolar atrial electrograms, the phase from the Hilbert transform depends on whether a deflection is one- or two-phased, on the ratio of its R and S waves, and on noise (Kuklik et al. 2015). Kuklik and colleagues proposed rebuilding the electrogram first from sine wavelets whose amplitudes are proportional to the negative slope of the signal (Kuklik et al. 2015). With \(w(\tau) = \max\!\left(0, -\dot x(\tau)\right)\) and a wavelet \(\psi\) that is one period of a sine of length \(T\):
\[ s(t) = \int w(\tau)\, \psi(t - \tau)\, d\tau, \qquad \psi(u) = \sin\!\left(\frac{2\pi u}{T}\right) \text{ for } \lvert u\rvert \le \tfrac{T}{2}, \ 0 \text{ otherwise} \tag{5}\]
then take the Hilbert phase of \(s\). In this course \(T\) is set to the cycle length. Each activation, whatever its shape, then adds one phase cycle (a test checks this on signals with random R/S ratios and noise).
Key takeaways
- Hilbert phase is clean for smooth, nearly periodic signals.
- For contact electrograms, recompose from slope-weighted sine wavelets before taking the phase.
Phase singularities
Walk around a small closed loop on a phase map and add up the changes in phase, each wrapped into \((-\pi, \pi]\). The total is a whole multiple of \(2\pi\):
\[ n = \frac{1}{2\pi} \oint \nabla\varphi \cdot d\boldsymbol{\ell} = \frac{1}{2\pi} \sum_{k} \operatorname{wrap}\!\left(\varphi_{k+1} - \varphi_k\right) \tag{6}\]
\(n\) is the topological charge. It is zero for any loop that does not enclose a phase singularity (PS) and \(\pm 1\) around one, the sign giving the direction of rotation (Bray et al. 2001; Bray and Wikswo 2002). A spiral wave has one PS at its tip; a plane wave has none.
On a real catheter the loop is a ring of electrodes, and noise or interpolation can make the sum come out at \(\pm 2\pi\) by chance. In high-density epicardial AF recordings, at least eight electrodes in a ring were needed to avoid frequent false-positive PS due to chance (Kuklik et al. 2017).
Key takeaways
- Topological charge counts net phase winding around a loop: \(\pm1\) at a PS, 0 elsewhere.
- Few electrodes per ring means false singularities; test any detector on data without rotors.
How fine must the electrodes be?
A train of wavefronts moving at speed \(v\) and repeating every \(\mathrm{CL}\) has its fronts a distance
\[ \lambda_s = v \cdot \mathrm{CL} \tag{7}\]
apart: the spatial wavelength. The tests measure it in a paced cable model. Simulations show that the electrode spacing needed to identify rotors and focal sources correctly is a linear function of this wavelength, and that rotor localization errors are larger with electrograms than with action potentials (Roney et al. 2017). A catheter that is coarse compared with \(\lambda_s\) cannot tell a rotor from other patterns.
Key takeaways
- Spatial wavelength = conduction velocity × cycle length.
- Required electrode spacing scales with that wavelength; coarse sampling creates and hides drivers.
Clinical correlate
Planned in the outline. Requires sign-off by an EP physician.
Visual summary
Planned in the outline.
How experts think
Planned in the outline.
Cheat sheet
Planned in the outline.
Interview questions
Planned in the outline.
Code lab
Planned in the outline.
Self-check
Planned in the outline.
Literature figures
Planned in the outline.
Further reading
Planned in the outline.