propagate() fails with uninformative error

Bug #1451655 reported by Brett
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HoloPy
New
Undecided
Unassigned

Bug Description

I'm trying to run the holopy reconstruction example (http://manoharan.seas.harvard.edu/holopy/users/recon_tutorial.html#reconstructing-data-numerical-propagation) which fails with an uninformative error inside the propagate() method. I've run the code in an iPython notebook, and I've posted my notebook with the error traceback for you to see with NBViewer:

http://nbviewer.ipython.org/gist/bmorris3/9cb40f80d609b13f7cf0

And below is the traceback.

---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
<ipython-input-1-96a8540cfb8d> in <module>()
      7
      8 holo = get_example_data('image0001.yaml')
----> 9 rec_vol = propagate(holo, linspace(4e-6, 10e-6, 7))
     10 hp.show(rec_vol)

/Users/bmorris/anaconda/lib/python2.7/site-packages/holopy/propagation/convolution_propagation.pyc in propagate(data, d, gradient_filter)
     79 ft = np.repeat(ft[:, :, np.newaxis,...], G.shape[2], axis=2)
     80
---> 81 ft = apply_trans_func(ft, G)
     82
     83 res = ifft(ft, overwrite=True)

/Users/bmorris/anaconda/lib/python2.7/site-packages/holopy/propagation/convolution_propagation.pyc in apply_trans_func(ft, G)
    117 # broadcasts correctly
    118 G = G[...,np.newaxis]
--> 119 ft[(m/2-mm):(m/2+mm),(n/2-nn):(n/2+nn)] *= G[:(mm*2),:(nn*2)]
    120
    121 # Transfer function may not cover the whole image, any values

IndexError: invalid slice

Any advice on what might be going wrong?

Thanks!
Brett Morris

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.