Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem with running a hologram generation and reconstruction animation #62

Open
Drachenbauer opened this issue Dec 19, 2024 · 0 comments

Comments

@Drachenbauer
Copy link

Drachenbauer commented Dec 19, 2024

It looked like the command python setup.py install from in the repo-main folder worked and installed something.

But trying to run a hologram generation and reconstruction animation from the examples said, that i still not had CUDA and CuPy.

so i installed CUDA and CuPy.
But now a new error occured at trying to launch a hologram generation and reconstruction animation:

PS F:\Mods\diffractsim-main\diffractsim-main\examples> python phase_hologram_kite_generation_and_reconstruction.py
Traceback (most recent call last):
  File "F:\Mods\diffractsim-main\diffractsim-main\examples\phase_hologram_kite_generation_and_reconstruction.py", line 9, in <module>
    PR.retrieve_phase_mask(max_iter = 200, method = 'Conjugate-Gradient')
  File "F:\Program Files\Python312\Lib\site-packages\diffractsim-2.2.7-py3.12.egg\diffractsim\holography\fourier_phase_retrieval.py", line 91, in retrieve_phase_mask
    target_amplitude = bd.array(resize_array(self.target_amplitude, (self.Ny + 2 * self.Ny//2 , self.Nx + 2 * self.Nx//2)))
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "F:\Program Files\Python312\Lib\site-packages\diffractsim-2.2.7-py3.12.egg\diffractsim\util\image_handling.py", line 63, in resize_array
    fun = interp2d(
          ^^^^^^^^^
  File "F:\Program Files\Python312\Lib\site-packages\scipy-1.15.0rc1-py3.12-win-amd64.egg\scipy\interpolate\_interpolate.py", line 129, in __init__
    raise NotImplementedError(err_mesg)
NotImplementedError: `interp2d` has been removed in SciPy 1.14.0.

For legacy code, nearly bug-for-bug compatible replacements are
`RectBivariateSpline` on regular grids, and `bisplrep`/`bisplev` for
scattered 2D data.

In new code, for regular grids use `RegularGridInterpolator` instead.
For scattered data, prefer `LinearNDInterpolator` or
`CloughTocher2DInterpolator`.

For more details see
https://scipy.github.io/devdocs/tutorial/interpolate/interp_transition_guide.html

I simply made a copy of the existing hologram file in the examples and replaced the filename of the used aperture-file with my own kite-shaped one, that i added to the Apertures folder.

What else do i miss in order to get that to work?

@Drachenbauer Drachenbauer changed the title problem with CPU acceleration problem with running a hologram traceback animation Dec 19, 2024
@Drachenbauer Drachenbauer changed the title problem with running a hologram traceback animation problem with running a hologram generation and reconstruction animation Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant