This is my first attempt at using shampoo. I am getting the following error with the USAF_test.tif in the repo:
\Anaconda3\lib\site-packages\shampoo-0.1.dev156-py3.5.egg\shampoo\reconstruction.py:419: RuntimeWarning: invalid value encountered in sqrt
np.sqrt(1.0 - first_term - second_term))
The code I am using is here:
from shampoo import Hologram
import matplotlib.pyplot as plt
hologram_path = 'C:\\Users\\xxxxx\\Desktop\\usaf_sqt.tiff'
propagation_distance = 0.03685 # m
h = Hologram.from_tif(hologram_path, wavelength=470e-6, dx=3.5e-6, dy=3.5e-6)
wave = h.reconstruct(propagation_distance)
fig, ax = wave.plot()
fig.suptitle("USAF Target")
fig.tight_layout()
plt.show()
I have tried my own .tif and I get the same result. I have also tried modifying the propagation_distance, wavelength and dx,dy variables, but I get the same problem.
This is my first attempt at using shampoo. I am getting the following error with the
USAF_test.tifin the repo:The code I am using is here:
I have tried my own
.tifand I get the same result. I have also tried modifying thepropagation_distance,wavelengthanddx,dyvariables, but I get the same problem.