Visisipy: accessible vision simulations in Python
Visisipy (pronounced /ˌvɪsəˈsɪpi/, like Mississippi but with a V) is a Python library for optical simulations of the eye.
It provides an easy-to-use interface to define and build eye models, and to perform common ophthalmic analyses on these models.
Goals
- Provide a uniform interface to define, build and analyze various types of eye models, using abstractions that are relevant in a clinical context.
- Provide a collection of ready-to-use eye models, such as the Navarro model1, that can be customized as needed.
- Provide an accessible interface to clinically relevant analyses on these models, such as off-axis refraction calculations.
- Modular design with support for multiple backends, both open-source and commercial.
Contributing
Visisipy aims to be a community-driven project and warmly accepts contributions. If you want to contribute, please email us (visisipy@mreye.nl) or open a new discussion.
Installation
Visisipy can be installed through pip:
pip install visisipy
Visisipy is also available on Conda Forge:
conda install -c conda-forge visisipy
Example
import matplotlib.pyplot as plt
import seaborn as sns
import visisipy
# Uncomment the following line to use the open-source Optiland backend instead of OpticStudio
# visisipy.set_backend("optiland")
# Initialize the default Navarro model
model = visisipy.EyeModel()
model.geometry.pupil.thickness = 2.0
# Build the model in OpticStudio
model.build()
# Perform a raytrace analysis
coordinates = [(0, 0), (0, 10), (0, 20), (0, 30), (0, 40)]
raytrace = visisipy.analysis.raytrace(coordinates=coordinates)
# Alternatively, the model can be built and analyzed in one go:
# raytrace = visisipy.analysis.raytrace(model, coordinates=zip([0] * 5, range(0, 60, 10)))
# Visualize the model
fig, ax = plt.subplots()
visisipy.plots.plot_eye(ax, model.geometry, lens_edge_thickness=0.5)
sns.lineplot(raytrace, x="z", y="y", hue="field", ax=ax)
plt.show()
Documentation
Read the full documentation at visisipy.readthedocs.io.
Metadata
Release files for visisipy 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| visisipy-0.4.1.tar.gz | 7.9 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| visisipy-0.4.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.0 MB
Release files / visisipy-0.4.1.tar.gz
| Download URL | visisipy-0.4.1.tar.gz |
|---|---|
| Size | 7.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
217ae51ba503086d01557c1ff22cd1ae7f72c7f07dee2ed40c3cdc08f7233885
|
|
BLAKE2b-256 checksum How to use checksums |
cf1a3849c5f7f7aec0e662fa77b17919efc9e7aa4b5e45a4a58a0761d1c16bc5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / visisipy-0.4.1-py3-none-any.whl
| Download URL | visisipy-0.4.1-py3-none-any.whl |
|---|---|
| Size | 130.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
32c78df6c7fd8a9a20b08a2bccb769b3197c139316750613c7b03b46c7f3783d
|
|
BLAKE2b-256 checksum How to use checksums |
4e36b0498af70eae209603b8af66fdff8bbbac77fedd31c4dd5d106ece65b3b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|