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.0a3.tar.gz
.
File metadata
- Download URL: visualacuity-0.1.0a3.tar.gz
- Upload date:
- Size: 37.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | afbf3dc7fe7ce93593d187c7d324507e0699d6fe78dd8c6c002ac67ec0439534 |
|
MD5 | 47dc92fa396aee0ab28a94be9e63751f |
|
BLAKE2b-256 | 625f327f3ad021377b795fa41ca39b388fffca9b6cde2c6dd67b940d23135d10 |
File details
Details for the file visualacuity-0.1.0a3-cp37-abi3-win_amd64.whl
.
File metadata
- Download URL: visualacuity-0.1.0a3-cp37-abi3-win_amd64.whl
- Upload date:
- Size: 954.4 kB
- Tags: CPython 3.7+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53fcf790673537cece78d8b53f1b2116865c91283d37ca470e4e29dafd972d8e |
|
MD5 | 270c37e8c08c3a54e511150816b65647 |
|
BLAKE2b-256 | f2d69afbc449e53e08f0b5b5cb2e9f6b999339087e147863cf9b285cfb0ac82a |
File details
Details for the file visualacuity-0.1.0a3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: visualacuity-0.1.0a3-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.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ade07c44d906edb0092d3476d56f3817748e073bd7e7048a020193e2b1d91209 |
|
MD5 | 74ef87b2f692ae9e67b1762ba03055ae |
|
BLAKE2b-256 | 8eab302831406c68af5fb8cc9a44ab06a200e8a81304d6cf31619b7b22238bac |
File details
Details for the file visualacuity-0.1.0a3-cp37-abi3-macosx_11_0_arm64.whl
.
File metadata
- Download URL: visualacuity-0.1.0a3-cp37-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.7+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78ec2807d59cafb964beb1f2797c729addd2de02ef29a716355d0bc2bc95820f |
|
MD5 | b6fa944757014545f63660aeb507f531 |
|
BLAKE2b-256 | 462d6010abcbf8acf91ca442647532e5fe5620bb646374ecbba1c0a1c0d69e19 |
File details
Details for the file visualacuity-0.1.0a3-cp37-abi3-macosx_10_12_x86_64.whl
.
File metadata
- Download URL: visualacuity-0.1.0a3-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.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca6d53b17d8244773e3e9f4bc88052765bbca08b3c4a34d2a741f8c5235851e6 |
|
MD5 | ba064a02a62d3ccc8706c03cec5b5ff9 |
|
BLAKE2b-256 | 6f4c6ad5d5f6a9753fee97f3bb0d8906eb34d1605e1da8c5a1333b0a25954bc5 |