resampling with one value does not result in a square image

Bug #1130336 reported by Rebecca W. Perry
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HoloPy
New
Undecided
Unassigned

Bug Description

In the resampling examples given below, the second one doesn't work as expected. The expected output is that h would be [300x300] and the spacing with be [ 0.05466667 0.05466667]. Instead, the image is just shrunk along the first axis.

import holopy as hp
from holopy.core import ImageSchema, Optics

optics = hp.core.Optics(wavelen=.532, index=1.405,
                        polarization=[1.0, 0.0])

#resampling with both dimensions explicitly specified:
h = hp.core.marray.Image(zeros([400,400]), spacing = .041, optics = optics)
h = h.resample([300,300])
print h.spacing

#resampling with just one number:
h = hp.core.marray.Image(zeros([400,400]), spacing = .041, optics = optics)
h = h.resample(300)
print h.spacing

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.