No project description provided
Project description
License
This software is available under the GNU General Public License v3.0. See the LICENSE file for more info.
How it works
Much of the behavior for visualacuity
is documented in the following spreadsheets, (which are also used for testing
the software):
testing/test_cases_conversions.tsv
demonstrates how the various methods of visual acuity measurements are converted into Snellen equivalents and LogMAR values.testing/test_cases_parsing.tsv
expresses the rules and limitations of converting plain-text values into structured objects
Installation
pip install visualacuity
Example Usage
import visualacuity
from visualacuity import *
#############
# Basic usage
parsed = visualacuity.parse_visit({
"Left Eye Distance SC": "20/30 -1",
"Right Eye Near CC": "J5",
})
assert parsed == {
"Left Eye Distance SC": VisitNote(
text="20/30 -1",
extracted_value="20/30",
plus_letters=[-1],
laterality=OS,
distance_of_measurement=DISTANCE,
correction=SC,
method=SNELLEN,
snellen_equivalent=(20, 30),
log_mar_base=0.17609125905568127,
log_mar_base_plus_letters=0.20107900637734125
),
"Right Eye Near CC": VisitNote(
text="J5",
extracted_value="J5",
laterality=OD,
distance_of_measurement=NEAR,
correction=CC,
method=JAEGER,
snellen_equivalent=(20, 40),
log_mar_base=0.3010299956639812,
log_mar_base_plus_letters=0.3010299956639812,
),
}
###########################
# "Plus" columns are merged
visit_data = {
"Both Eyes Near CC": "20/20",
"Both Eyes Near CC Plus": "+2"
}
parsed = visualacuity.parse_visit(visit_data)
assert parsed == {
"Both Eyes Near CC": VisitNote(
text="20/20",
text_plus="+2",
laterality=OU,
distance_of_measurement=NEAR,
correction=CC,
method=SNELLEN,
plus_letters=[+2],
extracted_value="20/20",
snellen_equivalent=(20, 20),
log_mar_base=0.0,
log_mar_base_plus_letters=-0.041646245536099975
)
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file visualacuity-0.1.0a2.tar.gz
.
File metadata
- Download URL: visualacuity-0.1.0a2.tar.gz
- Upload date:
- Size: 31.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f1c3495bf9a068274751820235b0a31945a48523b357556bf26709d09f21c0e |
|
MD5 | 999fe2c62cedc4378e07b7cda8a683de |
|
BLAKE2b-256 | 7f9e9d663b0ce6007219dc4c7660b57c919f27b453d88dfc2df420e22d9ad21a |
File details
Details for the file visualacuity-0.1.0a2-cp37-abi3-win_amd64.whl
.
File metadata
- Download URL: visualacuity-0.1.0a2-cp37-abi3-win_amd64.whl
- Upload date:
- Size: 876.9 kB
- Tags: CPython 3.7+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0e863956c4d7949ca199e5a1b9f55a9623034f923bc6b441dfa69c63ddd4e18 |
|
MD5 | 063bddaeb067c6461f86e37b04a56a1e |
|
BLAKE2b-256 | 7024c425ad2199d04b23610be9fa6ef20935e3bc4331983a30330179255c1c06 |
File details
Details for the file visualacuity-0.1.0a2-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: visualacuity-0.1.0a2-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 2.0 MB
- Tags: CPython 3.7+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dde0f04960071201e0dd3b15dc2e2c3a5afc83f46c3ac03db8d2e2f31072d7af |
|
MD5 | 4dadb798a2686f2309eff6692fa6e900 |
|
BLAKE2b-256 | b01c2239ae5d5f272e4cd227a4a8967f58e9abbb1ed50f7a6c2f185503acaa85 |
File details
Details for the file visualacuity-0.1.0a2-cp37-abi3-macosx_11_0_arm64.whl
.
File metadata
- Download URL: visualacuity-0.1.0a2-cp37-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.7+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 799a68072ca457b3bdb1daf40990007afa60bb6e80610c189c7e4bee81944d37 |
|
MD5 | 6f15c7e2cc46e1e250fc5ec84f8de575 |
|
BLAKE2b-256 | 11396053b0eec196e84b7ec0a896b7ccbb0fbd639aefcacdf40e2322c7774daa |
File details
Details for the file visualacuity-0.1.0a2-cp37-abi3-macosx_10_12_x86_64.whl
.
File metadata
- Download URL: visualacuity-0.1.0a2-cp37-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.7+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7510d427cdf3e997696eb9b35678c30f0b9bbc7b40642cea2168bd4baf7dd6f |
|
MD5 | 1ce0151e2838ed8bdd0bddf432bbbfae |
|
BLAKE2b-256 | adc74d44e17b323d5331367fabbc94d299bb749b05e2491da23adc8902f3186c |