Skip to main content

logmar

Convert visual acuity between logMAR, Snellen, and decimal. Pure arithmetic, zero dependencies.

pip install logmar
import logmar

logmar.snellen_to_logmar("20/40")  # 0.301
logmar.logmar_to_snellen(0.3)      # "20/40"
logmar.snellen_to_logmar("6/12")   # 0.301  (metric Snellen, same acuity)
logmar.decimal_to_logmar(0.5)      # 0.301
logmar.logmar_to_decimal(0.0)      # 1.0  (20/20)

API

  • snellen_to_logmar("20/40") / logmar_to_snellen(0.3, base=20)
  • decimal_to_logmar(0.5) / logmar_to_decimal(0.3)
  • snellen_to_decimal("20/40") / decimal_to_snellen(0.5, base=20)

logMAR = −log₁₀(decimal acuity); Snellen m/x has decimal m/x. 20/20 = 0.0 logMAR = 1.0 decimal; larger logMAR is worse acuity.

Licence

MIT.

Metadata

Release files for logmar 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for logmar 0.1.0
File Size Uploaded Provenance
logmar-0.1.0.tar.gz 3.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for logmar 0.1.0
File Interpreter ABI Platform
logmar-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 6.2 kB

Release files / logmar-0.1.0.tar.gz

Download URL logmar-0.1.0.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
dd822995cd16553e4469ce7f6be772478525dd868cf2594a3f443bbf05a36af5
BLAKE2b-256 checksum
How to use checksums
91d49ebd8b687bae0b06253df42631cc8033f152ab7484e82d90fad424c65867
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / logmar-0.1.0-py3-none-any.whl

Download URL logmar-0.1.0-py3-none-any.whl
Size 3.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
55b0b252c972e68d5afb54f7f92afb96420cb6b1152511163b4989ba2cd6f3f1
BLAKE2b-256 checksum
How to use checksums
42d9b5dbdc17feaf5f5d25f5ed95fc1c20cd3cd19d7359041896e44df08e5ff3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for logmar 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page