mkogg.py: Fix 'self.get_mp4_metadata(self, source)'
[blog.git] / posts / Pulse_oxymetry.mdwn_itex
1 My wife was recently reviewing some [pulse oxymeter][pox] notes while
2 working a round of anesthesia.  It took us a while to trace the logic
3 through all the symbol changes and notation shifts, and my wife's
4 math-discomfort and my bio-discomfort made us more cautious than it
5 turns out we needed to be.  There are a number of nice [review
6 articles][art] out there that I turned up while looking for explicit
7 derivations, but by the time I'd found them, my working notes had
8 gotten fairly well polished themselves.  So here's my contribution to
9 the pulse-ox noise ;).  Highlights include:
10
11 * Short and sweet (with pictures)
12 * [Symbols table](#nomenclature)
13 * Baby steps during math manipulation
14
15 Oxygen content
16 ==============
17
18 The circulatory system distributes oxygen ([O₂](#O2)) throughout the
19 body.  The amount of O₂ at any given point is measured by the O₂
20 content ([O₂]), usually given in $\frac{\text{mL O₂ at BTP}}{\text{dL
21 blood}}$ ([BTP](#BTP) is my acronym for body temperature and
22 pressure).  Most transported O₂ is bound to [hemoglobin][]
23 ([Hb](#Hb)), but there is also free O₂ disolved directly in the plasma
24 and cytoplasm of suspended cells.
25
26 <a id="eq:O2-symbolic"></a>
27
28
29 \[ [\text{O₂}] = a\text{[Hb]}\text{S}_\text{O₂} + b\text{P}_\text{O₂} \;, \]
30
31 where [$\text{S}_\text{O₂}$](#S-O2) is the Hb's O₂ saturation and
32 [$\text{P}_\text{O₂}$](#P-O2) is the O₂ partial pressure.  Don't worry
33 about the coefficients $a$ and $b$ yet, we'll get back to them in a
34 second.
35
36 The amound of dissolved O₂ is given by its [partial pressure][partial]
37 ($\text{P}_\text{O₂}$).  Partial pressures are generally given in mm
38 of mercury ([Hg](#Hg)) at standard temperature and pressure
39 ([STP](#STP)).  Because the partial pressure changes as blood flows
40 through the body, an additional specifier $i$ may be added
41 ([$\text{P}i_\text{O₂}$](#Pi-O2)) to clarify the measurement location.
42
43 <table id="locations" class="center">
44   <tr><th>$i$</th><th>Full symbol</th><th>Location descriptor</th></tr>
45   <tr><td>a</td><td style="text-align: center">$\text{Pa}_\text{O₂}$</td>
46     <td>arterial</td></tr>
47   <tr><td>p</td><td style="text-align: center">$\text{Pp}_\text{O₂}$</td>
48     <td>peripheral or pulsatile</td></tr>
49   <tr><td>t</td><td style="text-align: center">$\text{Pt}_\text{O₂}$</td>
50     <td>tissue</td></tr>
51   <tr><td>v</td><td style="text-align: center">$\text{Pv}_\text{O₂}$</td>
52     <td>venous</td></tr>
53 </table>
54
55 O₂ is carried in the blood primarily through binding to hemoglobin
56 monomers (Hb), with each monomer potentially binding a single O₂.
57 Oxygen saturation ($\text{S}_\text{O₂}$) is the fraction of hemoglobin
58 monomers (Hb) that have bound an oxygen molecule (O₂).
59
60 <a id="eq:S-O2"></a>
61
62 \[ \text{S}_\text{O₂} = \frac{\text{[HbO₂]}}{\text{[Hb]}} \;. \]
63
64 The ratio of concentrations, $\text{S}_\text{O₂}$, is unitless.  It
65 is often expressed as a percentage.  [Hb] is often given in g/dL.  As
66 with partial pressures, an additional specifier $i$ may be added
67 ([$\text{S}i_\text{O₂}$](#Si-O2)) to clarify the measurement location
68 ($\text{Sa}_\text{O₂}$, $\text{Sp}_\text{O₂}$, …).
69
70 Now we can take a second look at our [O₂ content
71 formula](#eq:O2-symbolic).  The coefficient $a$ must convert g/dL
72 to $\frac{\text{mL O₂ at BTP}}{\text{dL blood}}$.  Using the molecular
73 weight of Hb and the [volume of a mole of gas at STP][mole-volume]:
74
75 <a id="eq:a"></a>
76
77 \[
78 \begin{aligned}
79   \text{[Hb]} &= \chi \frac{\text{g Hb}}{\text{dL blood}}
80       \cdot\frac{1\text{ mol Hb}}{17\text{ kg Hb}}
81       \cdot\frac{1\text{ mol O₂}}{1\text{ mol Hb}}
82       \cdot\frac{\sim1\text{ mol ideal gas}}{1\text{ mol O₂}}
83       \cdot\frac{22.4\text{ L ideal gas at STP}}{1\text{ mol ideal gas}}
84       \cdot\frac{\sim1\text{ L ideal gas at BTP}}{1\text{ L ideal gas at STP}}
85       \\
86     &\approx
87        \chi \frac{\text{g Hb}}{\text{dL blood}}
88        \cdot 1.32 \frac{\text{mL O₂ at BTP}}{\text{g Hb}}
89     = 1.32\chi \frac{\text{mL O₂ at BTP}}{\text{dL blood}} \;,
90 \end{aligned}
91 \]
92
93 where $\chi$ is a pure number (we're just working out the unit
94 conversion here, not converting a particular Hg concentration).
95 Therefore, $a=1.32 \frac{\text{mL O₂ at BTP}}{\text{g Hb}}$.  The
96 powers that be seem to have used a slightly different density, since
97 the more commonly used value is 5% higher at $1.39$.  Possibly someone
98 actually measured the density of O₂ at BTP, because BTP is not STP,
99 and O₂ is not an ideal gas.
100
101 The coefficient $b$ must convert mm Hg at STP
102 to $\frac{\text{mL O₂ at BTP}}{\text{dL blood}}$.  Empirical
103 experiments (?) give a value
104 of $b=0.003\frac{\text{mL O₂ at BTP}}{\text{dL blood ⋅ mm Hg at STP}}$.
105 Now we can write out the familiar form
106
107 <a id="eq:O2"></a>
108
109 \[ \text{[O₂]}
110      = 1.39 \frac{\text{mL O₂ at BTP}}{\text{g Hb}} [Hb] \text{S}_\text{O₂}
111      + 0.003\frac{\text{mL O₂ at BTP}}
112                  {\text{dL blood } \cdot \text{ mm Hg at STP}}
113                                                         \text{P}_\text{O₂}  \;. \]
114
115 Reasonable levels are
116
117 <table class="center" style="border-spacing: 40px 0px">
118   <tr><td>[Hb]</td><td>$14\frac{\text{g Hb}}{\text{dL blood}}$</td></tr>
119   <tr><td>$\text{S}_\text{O₂}$</td><td>98%</td></tr>
120   <tr><td>$\text{P}_\text{O₂}$</td><td>100 mm Hg at STP</td></tr>
121   <tr><td>$1.39 \frac{\text{mL O₂}}{\text{g Hb}}\text{[Hb]}\text{S}_\text{O₂}$     </td><td>$19.1\frac{\text{mL O₂ at BTP}}{\text{dL blood}}$</td></tr>
122   <tr><td style="white-space: nowrap">$0.003\frac{\text{mL O₂ at BTP}}
123     {\text{dL blood } \cdot \text{ mm Hg at STP}}\text{P}_\text{O₂}$</td><td>
124     $0.300\frac{\text{mL O₂ at BTP}}{\text{dL blood}}$</td></tr>
125 </table>
126
127 Because the dissolved O₂ has such a tiny contribution (1.5% of the
128 total in my example), it is often measured at STP rather than BTP.
129 Sometimes it is dropped from the calculation entirely.  We focus on
130 the more imporant $\text{[Hb]}\text{S}_\text{O₂}$ in the next section.
131
132 Oxygen saturation
133 =================
134
135 The [preceding](#eq:S-O2) [discussion](#eq:O2)
136 used $\text{[Hb]}\text{S}_\text{O₂}$ to represent the concentration of
137 HbO₂ complexes.  This was useful while we were getting our bearings,
138 but now we will replace that term with a more detailed model.  Let us
139 sort the Hb monomers into species:
140
141 * [Hb](#Hb): all hemoglobin monomers
142 * [HbO₂](#HHb): monomers complexed with O₂
143 * [HHb](#HHb): reduced Hb (not complexed with O₂)
144 * [dysHb](#dysHb): dys-hemoglobin (cannot complex with O₂)
145 * [MHb](#MHb): methemoglobin
146 * [HbCO](#HbCO): carboxyhemoglobin
147
148 These species are related as follows
149
150 \[
151 \begin{aligned}
152   \text{[Hb]} &= \text{[HbO₂]} + \text{[HHb]} + \text{[dysHb]} \\
153   \text{[dysHb]} &= \text{[MHb]} + \text{[HbCO]} + \text{other broken forms}
154 \end{aligned}
155 \]
156
157 Because modern two-color pulse-oximeters don't
158 measure $\text{S}_\text{O₂}$ exactly, the related quantity that they
159 *do* measure has been given a name of its own: the *functional*
160 saturation ([$\text{Sf}_\text{O₂}$](#Sf-O2)).
161
162 <a id="eq:Sfunc-O2"></a>
163
164 \[
165  \text{Sf}_\text{O₂} = \frac{\text{[HbO₂]}}{\text{[HbO₂]} + \text{[HHb]}} \;.
166 \]
167
168 Rephrasing our [earlier saturation](#eq:S-O2), we see
169
170 <a id="eq:Sfrac-O2"></a>
171
172 \[
173   \text{S}_\text{O₂} = \frac{\text{[HbO₂]}}{\text{[Hb]}}
174     = \frac{\text{[HbO₂]}}{\text{[HbO₂]} + \text{[HHb]} + \text{[dysHb]}} \;.
175 \]
176
177 To avoid confusion with $\text{Sf}_\text{O₂}$, our
178 original $\text{S}_\text{O₂}$ is sometimes referred to as the
179 *fractional* saturation.
180
181 The Beer-Labmert law
182 ====================
183
184 So far we've been labeling and defining attributes of the blood.  The
185 point of this excercise is to understand how a pulse oximeter measures
186 them.  People have known for a while that different hemoglobin
187 complexes (HbO₂, HHb, MHb, HbCO, …) have differnt absorbtion spectra,
188 and they have been using this difference since the 1930's to make
189 pulse-oximeters based on two-color transmittance measurements (see
190 [Tremper 1989][T89]).
191
192 [[!img absorbtion.png
193  size="600x418"
194  alt="Absorbance spectra for assorted hemoglobin species"
195  caption="Absorbance spectra for assorted hemoglobin species (Tremper 1989)"]]
196
197 By passing different wavelengths of light through perfused tissue, we
198 can measure the relative quantities of the different Hb species.
199 The basis for this analysis comes from the [Beer-Lambert law][BL].
200
201 <a id="eq:BL"></a>
202
203 \[ I = I_0 e^{-c \epsilon L}  \;, \]
204
205 where [$I_0$](#I0) is the incident intensity (entering the tissue),
206 [$I$](#I0lambda) is the tranmitted intensity (leaving the tissue),
207 [$c$](#c) is the tissue density (concentration),
208 [$\epsilon$](#eilambda) is the extinction coefficient (molar
209 absorbtivity), and [$L$](#L) is the tissue thickness.  Rephrasing the
210 math as English, this means that the intensity drops off exponentially
211 as you pass through the tissue, and more tissue (higher $c$ or $L$) or
212 more opaque tissue (higher $\epsilon$) mean you'll get less light out
213 the far side.  This is a very simple law, and the price of the
214 simplicity is that it brushes all sorts of things under the rug.
215 Still, it will help give us a basic idea of what is going on in a
216 pulse-oximeter.
217
218 Rather than treat the the tissue as a single substance, lets use the
219 Beer-Labmert law on a mixture of substances with
220 concentrations $c_1$, $c_2$, … and extinction
221 coefficients $\epsilon_1$, $\epsilon_2$, ….
222
223 \[ I = I_0 e^{-(c_1 \epsilon_1 + c_2 \epsilon_2 + \ldots) L} \;. \]
224
225 We also notice that the intensities and extinction coefficients may
226 all depend on the wavelength of light $\lambda$, so we should really
227 write
228
229 <a id="eq:BL-lambda"></a>
230
231 \[
232   I_\lambda = I_{0\lambda} e^{-(c_1 \epsilon_{1\lambda}
233                                 + c_2 \epsilon_{2\lambda} + \ldots) L} \;. 
234 \]
235
236 Once isolated, a simple spectroscopy experiment can measure the
237 extinction coefficient [$\epsilon_{i\lambda}$](#eilambda) of a given
238 species across a range of $\lambda$, and this has been done for all of
239 our common Hb flavors.  We need to play with the last equation to find
240 a way to extract the unknown concentrations, which we can then use to
241 [calculate the $\text{Sf}_\text{O₂}$](#eq:Sfunc-O2) and
242 [$\text{S}_\text{O₂}$](#eq:Sfrac-O2) which we can use in turn to
243 calculate [$\text{[O₂]}$](#eq:O2).
244
245 Note that by increasing the number of [LEDs](#LED) (adding
246 new $\lambda$) we increase the number of constraints on the
247 unknown $c_i$.  A traditional pulse-oximeter uses two LEDs, at 660 nm
248 and 940 nm, to measure $\text{Sf}_\text{O₂}$ (related to [HbO₂] and
249 [HHb]).  More recent designs called [pulse CO-oximeters][CO-ox] use
250 more wavelengths to allow measurement of quanties related to
251 additional species (approaching the end goal of
252 measuring $\text{S}_\text{O₂}$).
253
254 Let us deal with the fact that there is a lot of stuff absorbing light
255 that is not arterial blood (e.g. venous blood, other tissue, bone,
256 etc).  The good thing about this stuff is that it's just sitting there
257 or moving through in a smooth fasion.  Arterial blood is the only
258 thing that's pulsing.  Here's another figure from [Tremper][T89]:
259
260 <a id="fig:ac-dc"></a>
261
262 [[!img ac-dc.png
263  size="600x204"
264  alt="AC and DC transmission components"
265  caption="AC and DC transmission components (Tremper)"]]
266
267 During a pulse, the pressure in the finger increases and non-arterial
268 tissue is compressed, changing $L$ and $c_i$ from their trough values
269 to peak values $L'$ and $c_i'$.  Since the finger is big, the
270 fractional change in width $\mathrm{d} L/L=(L'-L)/L$ is very small.
271 Assuming the change in concentration is even smaller (since most
272 liquids are fairly incompressible), we have
273
274 <a id="eq:dI-I-naive"></a>
275
276 \[
277 \begin{aligned}
278   \frac{\mathrm{d} I_\lambda}{\mathrm{d} L}
279     &= \frac{\mathrm{d}}{\mathrm{d}L}
280       \left(I_{0\lambda}
281              e^{-(c_1 \epsilon_{1\lambda}
282                   + c_2 \epsilon_{2\lambda} + \ldots) L}\right)
283     = \frac{\mathrm{d}}{\mathrm{d} L} \left( I_{0\lambda} e^{-X L} \right)
284     = -X I_{0\lambda} e^{-X L}
285     = -XI_\lambda \\
286   \frac{\mathrm{d} I_\lambda}{I_\lambda}
287     &= -X \mathrm{d} L  \;,
288 \end{aligned}
289 \]
290
291 where $X=c_1 \epsilon_{1\lambda} + c_2 \epsilon_{2\labmda} + \ldots$
292 is just a placeholder to reduce clutter.  $\mathrm{d} I_\lambda$ is
293 the AC amplitude (height of wiggle top of the detected light intensity
294 due to pulsatile arterial blood), while $I_\lambda$ is the DC ampltude
295 (height of the static base of the detected light intensity due to
296 everything else).  This is actually a fairly sneaky step, because if
297 we can also use it to drop the DC compents.  Because we've assumed
298 fixed concentrations (incompressible fluids), and there is no more DC
299 material coming in during a pulse (by definition), the effective $L$
300 for the DC components does not change.  Separating the DC and AC
301 components and running through the derivative again, we have
302
303 <a id="eq:dI-I"></a>
304
305 \[
306 \begin{aligned}
307   \frac{\mathrm{d} I_\lambda}{\mathrm{d} L}
308     &= \frac{\mathrm{d}}{\mathrm{d} L} \left(
309          I_{0\lambda}
310          e^{-(c_{\text{DC}1}\epsilon_{\text{DC}1\lambda}
311               +c_{\text{DC}2}\epsilon_{\text{DC}2\lambda} + \ldots)
312              L_\text{DC}
313             -(c_{\text{AC}1}\epsilon_{\text{AC}1\lambda}
314               +c_{\text{AC}2}\epsilon_{\text{AC}2\lambda} + \ldots)
315              L_\text{AC}}
316        \right) \\
317     &= I_{0\lambda}
318        e^{-(c_{\text{DC}1}\epsilon_{\text{DC}1\lambda}
319             +c_{\text{DC}2}\epsilon_{\text{DC}2\lambda} + \ldots)
320            L_\text{DC}}
321        \frac{\mathrm{d}}{\mathrm{d} L} \left(
322          e^{-(c_{\text{AC}1}\epsilon_{\text{AC}1\lambda}
323               +c_{\text{AC}2}\epsilon_{\text{AC}2\lambda} + \ldots)
324              L_\text{AC}}
325        \right) \\
326     &= I_{0\lambda} Y \frac{\mathrm{d}}{\mathrm{d} L} \left(
327          e^{-Z L_\text{AC}} \right)
328     = -Z I_{0\lambda} Y e^{-Z L_\text{AC}}
329     = -Z I_\lambda \\
330   \frac{\mathrm{d} I_\lambda}{I_\lambda} &= -Z \mathrm{d} L \;,
331 \end{aligned}
332 \]
333
334 where $Y=e^{-(c_{\text{DC}1}\epsilon_{\text{DC}1\lambda}
335             +c_{\text{DC}2}\epsilon_{\text{DC}2\lambda} + \ldots)
336            L_\text{DC}}$
337 and $Z=c_{\text{AC}1}\epsilon_{\text{AC}1\lambda}
338       +c_{\text{AC}2}\epsilon_{\text{AC}2\lambda} + \ldots)$
339 are just placeholders to reduce clutter.  Note that the [last
340 equation](#eq:dI-I) looks just like the [previous one](#eq:dI-I-naive)
341 with the translation $X\rightarrow Z$.  This means that if we stick to
342 using the AC-DC intensity ratio ($\frac{\mathrm{d} \Il}{\Il}$) we can
343 forget about the DC contribution completely.
344
345 If the changing-$L$-but-static-$L_\text{DC}$ thing bothers you, you
346 can imagine insteadthat $L_\text{DC}$ grows with $L$,
347 but $c_{\text{DC}i}$ shrinks proportially (to conserve mass).  With
348 this proportionate stretching, there is still no change in absorbtion
349 for that component
350 so $\frac{\mathrm{d}}{\mathrm{d}L}\exp(-c_{\text{DC}i}\epsilon_{\text{DC}i\lambda}L)=0$
351 and we can still pull the DC terms out of the integral as we
352 [just did](#eq:dI-I).
353
354 Taking a ratio of these amplitudes at two different wavelengths, we
355 get optical density ratio ([R](#R))
356
357 <a id="eq:R-Z"></a>
358
359 \[
360   R = \frac{\frac{\text{AC}_{660}}{\text{DC}_{660}}}
361            {\frac{\text{AC}_{940}}{\text{DC}_{940}}}
362     = \frac{\frac{\mathrm{d} I_{660}}{I_{660}}}
363            {\frac{\mathrm{d} I_{940}}{I_{940}}}
364     = \frac{-Z_{660} \mathrm{d} L}{-Z_{940} \mathrm{d} L}
365     = \frac{Z_{660}}{Z_{940}}  \;,
366 \]
367
368 because $\mathrm{d} L$ (the amount of finger expansion during a pulse)
369 obviously doesn't depend on the color light you are using.  Plugging
370 back in for $Z$,
371
372 <a id="R-ce"></a>
373
374 \[
375   R = \frac{c_{\text{AC}1}\epsilon_{\text{AC}1,660}
376             + c_{\text{AC}2}\epsilon_{\text{AC}2,660} + \ldots}
377            {c_{\text{AC}1}\epsilon_{\text{AC}1,940}
378             + c_{\text{AC}2}\epsilon_{\text{AC}2,940} + \ldots}
379 \]
380
381 Assuming, for now, that there are only two species of Hb—HbO₂ and
382 HHb—we can solve for $c_{\text{AC}1}/c_{\text{AC}2}$.
383
384 \[
385 \begin{aligned}
386   R &= \frac{c_{\text{AC}1}\epsilon_{\text{AC}1,660}
387              + c_{\text{AC}2}\epsilon_{\text{AC}2,660}}
388             {c_{\text{AC}1}\epsilon_{\text{AC}1,940}
389              + c_{\text{AC}2}\epsilon_{\text{AC}2,940}} \\
390   R(c_{\text{AC}1}\epsilon_{\text{AC}1,940}
391     + c_{\text{AC}2}\epsilon_{\text{AC}2,940})
392     &= c_{\text{AC}1}\epsilon_{\text{AC}1,660}
393        + c_{\text{AC}2}\epsilon_{\text{AC}2,660} \\
394   c_{\text{AC}1} (R\epsilon_{\text{AC}1,940} - \epsilon_{\text{AC}1,660})
395     &= c_{\text{AC}2} (\epsilon_{\text{AC}2,660} - R\epsilon_{\text{AC}2,940})
396        \\
397   \frac{c_{\text{AC}1}}{c_{\text{AC}2}}
398     &= \frac{\epsilon_{\text{AC}2,660} - R\epsilon_{\text{AC}2,940}}
399             {R\epsilon_{\text{AC}1,940} - \epsilon_{\text{AC}1,660}}
400     \;.
401 \end{aligned}
402 \]
403
404 So now we know [HbO₂]/[HHb] in terms of the measured quantity $R$ and
405 the empirical values $\epsilon$.
406
407 Plugging in to our [equation for $\text{Sf}_\text{O₂}$](#eq:Sfunc-O2)
408 to find the functional saturation:
409
410 <a id="eq:Sfunc-O2-R"></a>
411
412 \[
413 \begin{aligned}
414   \text{Sf}_\text{O₂} &= \frac{\text{[HbO₂]}}{\text{[HbO₂]} + \text{[HHb]}}
415     = \frac{1}{1 + \frac{\text{[HHb]}}{\text{[HbO₂]}}}
416     = \frac{1}{1 + \frac{c_{\text{AC}2}}{c_{\text{AC}1}}}
417     = \frac{1}
418            {1 + \frac{R\epsilon_{\text{AC}1,940} - \epsilon_{\text{AC}1,660}}
419                      {\epsilon_{\text{AC}2,660} - R\epsilon_{\text{AC}2,940}}}
420     \;.
421 \end{aligned}
422 \]
423
424 As a check, we can rephrase this as
425
426 \[
427 \begin{aligned}
428   \text{Sf}_\text{O₂}
429     &= \frac{1}
430             {1 + \frac{R\epsilon_{\text{AC}1,940} - \epsilon_{\text{AC}1,660}}
431                       {\epsilon_{\text{AC}2,660} - R\epsilon_{\text{AC}2,940}}}
432     = \frac{\epsilon_{\text{AC}2,660} - R\epsilon_{\text{AC}2,940}}
433            {\epsilon_{\text{AC}2,660} - R\epsilon_{\text{AC}2,940}
434             + R\epsilon_{\text{AC}1,940} - \epsilon_{\text{AC}1,660}} \\
435     &= \frac{\epsilon_{\text{AC}2,660} - R\epsilon_{\text{AC}2,940}}
436             {\epsilon_{\text{AC}2,660} - \epsilon_{\text{AC}1,660}
437              + (\epsilon_{\text{AC}1,940} - \epsilon_{\text{AC}2,940})R}
438     = \frac{-\epsilon_{\text{AC}2,660} + \epsilon_{\text{AC}2,940}R}
439            {\epsilon_{\text{AC}1,660} - \epsilon_{\text{AC}2,660}
440             + (\epsilon_{\text{AC}2,940} - \epsilon_{\text{AC}1,940})R}
441     \;,
442 \end{aligned}
443 \]
444
445 which matches [Mendelson 1989][M89], Eq. 8 with the translations:
446
447 * $\text{Sf}_\text{O₂}\rightarrow Sp\text{O₂}$,
448 * $R\rightarrow R/IR$,
449 * $\epsilon_{\text{AC}2,660}\rightarrow\epsilon_R(\text{Hb})$,
450 * $\epsilon_{\text{AC}2,940}\rightarrow\epsilon_IR(\text{Hb})$,
451 * $\epsilon_{\text{AC}1,660}\rightarrow\epsilon_R(\text{HbO₂})$, and
452 * $\epsilon_{\text{AC}1,940}\rightarrow\epsilon_IR(\text{HbO₂})$.
453
454 And that is the first-order explaination of how a pulse-oximeter
455 measures the functional saturation!
456
457 Reading extinction coefficients off the [absorbtion
458 figure](#fig:absorbtion), I get
459
460 \[
461 \begin{aligned}
462   \epsilon_{\text{HbO₂},660} &= \epsilon_{\text{AC}1,660} = 0.10 \\
463   \epsilon_{\text{HHb},660} &= \epsilon_{\text{AC}2,660} = 0.83 \\
464   \epsilon_{\text{HbO₂},940} &= \epsilon_{\text{AC}1,940} = 0.29 \\
465   \epsilon_{\text{HHb},940} &= \epsilon_{\text{AC}2,940} = 0.17
466 \end{aligned}
467 \]
468
469 which are comfortingly close to those given by [Mendelson][M89] in
470 Table 1.  The corresponding $\text{Sf}_\text{O₂}(R)$ plot (from
471 [Tremper][T89]) is:
472
473 [[!img SPO2vR.png
474  size="400x330"
475  alt="Experimental SpO₂ vs. R"
476  caption="Experimental SpO₂ vs. R (Tremper)"]]
477
478 [[!img SfO2vR-theory.png
479  size="300x300"
480  alt="Theoretical SfO₂ vs. R"
481  caption="Theoretical SfO₂ vs. R."]]
482
483 The theoretical plot was calculated using [[SfO2vR-theory.py]] and
484 [our $\text{Sf}_\text{O₂}$ equation](#eq:Sfunc-O2-R).  This is why
485 it’s a good idea to use an empirical calibration curve!  The concave
486 theoretical curve is supported by [Mendelson's figure 4][M89].
487
488 <!-- because LEDs are finicky, it's hard to know how bright they are
489 without looking ;).  Therefore, we'd like to work $I_{0\lambda}$ out
490 of the picture.  As blood pulses through the finger, imagine that the
491 concentrations -->
492
493 <a id="nomenclature"></a>
494
495 Nomenclature
496 ============
497
498 <dl>
499   <dt id="O2">O₂</dt><dd>Molecular oxygen</dd>
500   <dt id="[x]">[$x$]</dt><dd>Concentration of $x$ in the blood</dd>
501   <dt id="BTP">BTP</dt><dd>Body temperature and pressure</dd>
502         <dt id="STP">STP</dt>
503     <dd><a href="http://en.wikipedia.org/wiki/Standard_conditions_for_temperature_and_pressure">
504       Standard temperature and pressure</a></dd>
505         <dt id="P-O2">$\text{P}_\text{O₂}$</dt><dd>O₂ partial pressure</dd>
506         <dt id="Pi-O2">$\text{P}i_\text{O₂}$</dt>
507     <dd>O₂ partial pressure at <a href="#locations">location $i$</a></dd>
508         <dt id="S-O2">$\text{S}_\text{O₂}$</dt>
509     <dd><a href="#eq:Sfrac-O2">Fractional O₂ saturation</a></dd>
510         <dt id="Si-O2">$\text{S}i_\text{O₂}$</dt>
511     <dd>O₂ fractional saturation at <a href="#locations">location $i$</a></dd>
512         <dt id="Sf-O2">$\text{Sf}_\text{O₂}$</dt>
513     <dd><a href="#eq:Sfunc-O2">Functional O₂ saturation</a></dd>
514   <dt id="Hg">Hg</dt><dd>Mercury</dd>
515   <dt id="Hb">Hb</dt><dd>Hemoglobin monomer</dd>
516         <dt id="HbO2">HbO₂</dt><dd>Hemoglobin monomers complexed with O₂</dd>
517   <dt id="HHb">HHb</dt><dd>Reduced hemoglobin (not complexed with O₂)</dd>
518   <dt id="dysHb">dysHb</dt><dd>Dys-hemoglobin (cannot complex with O₂)</dd>
519   <dt id="MHb">MHb</dt>
520     <dd><a href="http://en.wikipedia.org/wiki/Methemoglobin">
521       Methemoglobin</a></dd>
522   <dt id="HbCO">HbCO</dt>
523     <dd><a href="http://en.wikipedia.org/wiki/Carboxyhemoglobin">
524       Carboxyhemoglobin</a></dd>
525   <dt id="I0lambda">$I_{0\lambda}$</dt>
526     <dd>Intensity of incident light at wavelength $\lambda$</dd>
527   <dt id="Ilambda">$I_\lambda$</dt>
528     <dd>Intensity of transmitted light at wavelength $\lambda$</dd>
529   <dt id="ci">$c_i$</dt>
530     <dd>Concentration of light-absorbing species $i$</dd>
531   <dt id="cDCi">$c_{\text{DC}i}$</dt>
532     <dd>Concentration of the $i$th DC species at wavelength $\lambda$</dd>
533   <dt id="cACi">$c_{\text{AC}i}$</dt>
534     <dd>Concentration of the $i$th AC species at wavelength $\lambda$</dd>
535   <dt id="eilambda">$\epsilon_{i\lambda}$</dt>
536     <dd>Extinction coefficient of species $i$ at wavelength $\lambda$</dd>
537   <dt id="eDCilambda">$\epsilon_{\text{DC}i\lambda}$</dt>
538     <dd>Extinction coefficient of the $i$th DC species
539       wavelength $\lambda$</dd>
540   <dt id="eACilambda">$\epsilon_{\text{DC}i\lambda}$</dt>
541     <dd>Extinction coefficient of the $i$th DC species
542       wavelength $\lambda$</dd>
543   <dt id="L">$L$</dt><dd>Length of tissue through which light must pass</dd>
544   <dt id="LDC">$L_\text{DC}$</dt><dd>Diastolic finger width</dd>
545   <dt id="R">$R$</dt><dd>Optical density ratio</dd>
546   <dt id="LED">LED</dt><dd>Light emitting diode</dd>
547 </dl>
548
549
550 [pox]: http://en.wikipedia.org/wiki/Pulse_oximeter
551 [art]: http://journals.lww.com/anesthesiology/Citation/1989/01000/Pulse_Oximetry.19.aspx
552 [hemoglobin]: http://en.wikipedia.org/wiki/Hemoglobin
553 [partial]: http://en.wikipedia.org/wiki/Partial_pressure
554 [mole-volume]: http://hyperphysics.phy-astr.gsu.edu/hbase/kinetic/idegas.html
555 [T89]: http://journals.lww.com/anesthesiology/Citation/1989/01000/Pulse_Oximetry.19.aspx
556 [BL]: http://en.wikipedia.org/wiki/Beer\%E2\%80\%93Lambert_law
557 [CO-ox]: http://en.wikipedia.org/wiki/Co-oximeter
558 [M89]: http://ieeexplore.ieee.org/xpl/freeabs_all.jsp?arnumber=30810
559
560 [[!tag tags/theory]]