opticspy / lightpipes

LightPipes for Python, "Pure Python version"
https://opticspy.github.io/lightpipes/
BSD 3-Clause "New" or "Revised" License
227 stars 52 forks source link

installation problems #57

Open FredvanGoor opened 3 years ago

FredvanGoor commented 3 years ago

It was noticed that the package pyFFTW is not always available for some platforms or (not yet) available for recent Python versions. (this is the case for Python 3.9 at the moment of writing this issue). Fortunately LightPipes can also use the FFT features of numpy, so we decided to make pyFFTW optional when pip-installing LightPipes at the cost of slightly lower performance.

I have released a new version (2.0.7) of LightPipes which allows optional installation of pyFFTW. Without pyFFTW LightPipes will use the FFT routines in numpy, which are a little bit slower. Using LightPipes with not so large grids (1000 x 1000 or so) you will not notice that. If you want maximum performance you should install pyFFTW by your self or install LightPipes with the pyfftw option.

So: Normal installation (so without pyFFTW) type at the terminal prompt:

pip install lightpipes

Later you can (try to) install pyFFTW and have maximum performance by:

pip install pyfftw

With the pyFFTW option (so install LightPipes and pyFFTW):

pip install lightpipes[pyfftw]

When you import LightPipes in your python script a warning is shown which advises you to install pyFFTW. You can suppress this (and other !) warnings by using the python -Wignore option:

python -Wignore YourLightPipesScript.py

When pyFFTW has been installed this warning is not shown.