rafael-fuente / diffractsim

✨🔬 A flexible diffraction simulator for exploring and visualizing physical optics.
https://rafael-fuente.github.io/simulating-diffraction-patterns-with-the-angular-spectrum-method-and-python.html
Other
754 stars 93 forks source link

Request for CPU multi core processing support #33

Open eitan-davis opened 2 years ago

eitan-davis commented 2 years ago

First, like your work, and I would like to make it better.

I would be nice to have support for multi-core processing. I know that numpy runs fast on the cpu but cannot use more then one core. Also not all computers can use well the gpu and installing and using cupy is not straight foreword and easy as numpy.

On the side, there are module that able to use multi core for mathematical operation like numba. In addition, its installation is simple and it is easy to use.

I would like to help with that and it seems that the change for the code would not be so big. Thanks

LtqxWYEG commented 1 month ago

I have a solution in my fork for automatic creation of animations: https://github.com/LtqxWYEG/diffractsim/blob/main/examples/create_animation.py For which you need this one as well: https://github.com/LtqxWYEG/diffractsim/blob/main/examples/phase_hologram_reconstruction_slave.py

Currently only does phase-contrast hologram animations.