Only read position coordinates for grid detection. Needs data_rewind before writing of (condensed due to readArray) head.

This commit is contained in:
Philip Eisenlohr 2016-04-24 09:22:07 -05:00
parent 3b53d1bc82
commit 648c2dd1d3
1 changed files with 5 additions and 5 deletions

View File

@ -76,9 +76,10 @@ for name in filenames:
# --------------- figure out size and grid ---------------------------------------------------------
table.data_readArray()
table.data_readArray(options.coords)
table.data_rewind()
coords = [np.unique(table.data[:,colCoord+i]) for i in xrange(3)]
coords = [np.unique(table.data[:,i]) for i in xrange(3)]
mincorner = np.array(map(min,coords))
maxcorner = np.array(map(max,coords))
grid = np.array(map(len,coords),'i')
@ -95,7 +96,6 @@ for name in filenames:
# ------------------------------------------ process data -------------------------------------------
table.data_rewind()
data = np.zeros(outSize.tolist()+[len(table.labels)])
p = np.zeros(3,'i')