Skip to content

Commit

Permalink
removed t_f field that was not used any longer
Browse files Browse the repository at this point in the history
  • Loading branch information
IvoVellekoop committed Oct 3, 2024
1 parent de461d1 commit d189213
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 8 deletions.
7 changes: 5 additions & 2 deletions openwfs/devices/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@
except ImportError:
pass # ok, we don't have nidaqmx installed

from . import slm
from .slm import SLM
try:
from . import slm
from .slm import SLM
except ImportError:
pass # ok, we don't have glfw or PyOpenGL installed
17 changes: 17 additions & 0 deletions openwfs/devices/slm/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
try:
import glfw
import OpenGL
except ImportError:
raise ImportError(
"""Could not initialize OpenGL because the glfw or PyOpenGL package is missing.
To install, make sure to install the required packages:
```pip install glfw```
```pip install PyOpenGL```
Alternatively, specify the opengl extra when installing openwfs:
```pip install openwfs[opengl]```
Note that these installs will fail if no suitable OpenGL driver is found on the system.
Please make sure you have the latest video drivers installed.
"""
)

from . import geometry
from . import patch
from . import shaders
Expand Down
9 changes: 3 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ build-backend = "poetry.core.masonry.api"
python = ">=3.9,<4.0"
numpy = ">=1.25.2" # also allow numpy 2.x.y
astropy = ">=5.1.0" # assuming the astropy.units is stable
glfw = "^2.5.9"
opencv-python = "^4.9.0.80"
matplotlib = "^3.7.3"
scipy = "^1.11.3"
Expand All @@ -32,11 +31,8 @@ annotated-types = "^0.7.0"
# optional dependencies for hardware components
nidaqmx = { version = "^1.0.1", optional = true }
harvesters = { version = "^1.4.2", optional = true }

[tool.poetry.group.opengl.dependencies]
# also required, but can be omitted explicitly using the without option
# this is used for read the docs, which has trouble with the OpenGL dependency
PyOpenGL = "^3.1.7"
PyOpenGL = { version = "^3.1.7", optional = true }
glfw = { version = "^2.5.9", optional = true }

[tool.poetry.extras]
# optional dependencies for hardware components
Expand All @@ -45,6 +41,7 @@ PyOpenGL = "^3.1.7"
# or poetry install --extras "nidaq" --extras "genicam"
nidaq = ["nidaqmx"]
genicam = ["harvesters"]
opengl = ["PyOpenGL", "glfw"]

[tool.black]
line-length = 120
Expand Down

0 comments on commit d189213

Please sign in to comment.