Skip to main content

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):

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

visualacuity-0.1.0a3.tar.gz (37.2 kB view hashes)

Uploaded Source

Built Distributions

visualacuity-0.1.0a3-cp37-abi3-win_amd64.whl (954.4 kB view hashes)

Uploaded CPython 3.7+ Windows x86-64

visualacuity-0.1.0a3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.0 MB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ x86-64

visualacuity-0.1.0a3-cp37-abi3-macosx_11_0_arm64.whl (1.1 MB view hashes)

Uploaded CPython 3.7+ macOS 11.0+ ARM64

visualacuity-0.1.0a3-cp37-abi3-macosx_10_12_x86_64.whl (1.1 MB view hashes)

Uploaded CPython 3.7+ macOS 10.12+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page