fixed handling of given resolution and dimension

This commit is contained in:
Martin Diehl 2012-10-17 10:04:13 +00:00
parent 5a225bf019
commit dcff640926
1 changed files with 5 additions and 5 deletions

View File

@ -122,8 +122,8 @@ for file in files:
max(map(float,grid[2].keys()))-min(map(float,grid[2].keys())),\
],'d') # dimension from bounding box, corrected for cell-centeredness
else:
resolution = options.resolution
dimension = options.dimension
resolution = numpy.array(options.resolution,'i')
dimension = numpy.array(options.dimension,'d')
if resolution[2] == 1:
options.packing[2] = 1
@ -154,9 +154,9 @@ for file in files:
sum = numpy.zeros(numpy.shape(data))
data = numpy.roll(data,axis=2,shift=options.shift[2])
data = numpy.roll(data,axis=1,shift=options.shift[1])
data = numpy.roll(data,axis=0,shift=options.shift[0])
data = numpy.roll(data,axis=2,shift=-options.shift[2])
data = numpy.roll(data,axis=1,shift=-options.shift[1])
data = numpy.roll(data,axis=0,shift=-options.shift[0])
for axis3 in xrange(options.packing[2]):
shiftedZ = numpy.roll(data,shift=axis3,axis=2)