Commit f3a2e11f authored by Matthew Tam's avatar Matthew Tam
Browse files

fixed a type-error in the ptychography data generated which stop the demo working.

parent 9547d13c
......@@ -1967,9 +1967,11 @@ class Ptychography(Problem):
# Calculate exit surface wave
esw = probe * sample;
# Calculate coherent diffraction pattern
assert( float(int(origin_x0-1)) == (origin_x0-1))
assert( float(int(origin_y0-1)) == (origin_y0-1))
i_exp[:,:,akk,bkk] = numpy.abs(numpy.rot90(numpy.roll( \
numpy.roll(scipy.fftpack.fft2(esw),origin_x0-1,axis=0), \
origin_y0-1,axis=1),-2))**2;
numpy.roll(scipy.fftpack.fft2(esw),int(origin_x0-1),axis=0), \
int(origin_y0-1),axis=1),-2))**2;
ind += 1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment