This treats CF as approximately 200 letters (per Holladay), so
CF at 10 feet has Snellen value "equivalent" of 10/200. HM is
approximately 10 times worse, so HM at 10 feet approximately
10/2000. After conversion, rough equivalents are passed to
logmar
to actually be converted.
Other functions are responsible for suitably parsing the text and
passing numbers to logmar
. If inverse = FALSE
(the default),
logmar
calculates \(-log_{10}(\frac{snell.numerator}{x})\).
If TRUE
, then \(\frac{snell.numerator}{10^{-x}}\).
The zero
argument is used to specify a "zero" logMAR value.
In particular, this is used when no distance information is given
(e.g., only "HM" or "CF" as opposed to "CF 6" or "HM 4").
For the reasioning and rational behind this, see the "Details"
section of VAConverter
.
For the snellen
function, the input should be character data
and have a numerator and denominator separated by '/'. E.g.,
“20/20”, “20/40 + 3”. This handles both simple
and Snellen values that need to be interpolated given the
appropriate chart.
logMAR calculations including interpolating partial lines.
Given “20/25 + 3”, calculate the logMAR of 20/25 and
20/20 (the next step up since '+'), and go 3/chart.nletters
of the way between these two values. Similarly if
“20/20 - 3”, it will go partway between 20/25 and 20/30.
Note that it depends on the lines and letters per line
on the actual chart used. The chart.values
and
chart.nletters
should contain all the lines and number
of letters for the chart that was used.
These functions were written to deal
with a very specific style of recording visual acuity for a study I
worked on. It may or may not have much use elsewhere. CFHM
was not intended to typically be called by the user directly.
Generally, a higher level function, (e.g., VAConverter
) would
be called.