corrected calculation of origin
This commit is contained in:
parent
8b5ba9f8f0
commit
13227dff0f
|
@ -123,11 +123,10 @@ for file in files:
|
||||||
max(map(float,grid[1].keys()))-min(map(float,grid[1].keys())),\
|
max(map(float,grid[1].keys()))-min(map(float,grid[1].keys())),\
|
||||||
max(map(float,grid[2].keys()))-min(map(float,grid[2].keys())),\
|
max(map(float,grid[2].keys()))-min(map(float,grid[2].keys())),\
|
||||||
],'d') # dimension from bounding box, corrected for cell-centeredness
|
],'d') # dimension from bounding box, corrected for cell-centeredness
|
||||||
origin = resolution/numpy.maximum(numpy.ones(3,'d'),resolution-1.0)* \
|
origin = numpy.array([min(map(float,grid[0].keys())),\
|
||||||
numpy.array([min(map(float,grid[0].keys())),\
|
min(map(float,grid[1].keys())),\
|
||||||
min(map(float,grid[1].keys())),\
|
min(map(float,grid[2].keys())),\
|
||||||
min(map(float,grid[2].keys())),\
|
],'d') - 0.5 * dimension / resolution
|
||||||
],'d')
|
|
||||||
else:
|
else:
|
||||||
resolution = numpy.array(options.resolution,'i')
|
resolution = numpy.array(options.resolution,'i')
|
||||||
dimension = numpy.array(options.dimension,'d')
|
dimension = numpy.array(options.dimension,'d')
|
||||||
|
|
Loading…
Reference in New Issue