Skip to content
Snippets Groups Projects
Commit 7d4a6c56 authored by Paul McCarthy's avatar Paul McCarthy
Browse files

Expansion range takes into account all previous dimensions. That makes

no sense, I know.
parent 27df5ee5
No related branches found
No related tags found
No related merge requests found
...@@ -476,8 +476,8 @@ def calcExpansion(slices, coverage): ...@@ -476,8 +476,8 @@ def calcExpansion(slices, coverage):
expansion[dimx][1] = xhi expansion[dimx][1] = xhi
# And will span the union of # And will span the union of
# the range and coverage for # the coverage, and calculated
# every other dimension. # range for every other dimension.
for dimy, ylo, yhi in reqRanges: for dimy, ylo, yhi in reqRanges:
if dimy == dimx: if dimy == dimx:
continue continue
...@@ -487,9 +487,16 @@ def calcExpansion(slices, coverage): ...@@ -487,9 +487,16 @@ def calcExpansion(slices, coverage):
# this duplication. # this duplication.
yLowCover, yHighCover = coverage[:, dimy, vol] yLowCover, yHighCover = coverage[:, dimy, vol]
expLow, expHigh = expansion[ dimy]
expansion[dimy][0] = min((ylo, yLowCover)) if np.isnan(expLow): expLow = yLowCover
expansion[dimy][1] = max((yhi, yHighCover)) if np.isnan(expHigh): expHigh = yHighCover
expLow = min((ylo, yLowCover, expLow))
expHigh = max((yhi, yHighCover, expHigh))
expansion[dimy][0] = expLow
expansion[dimy][1] = expHigh
# Finish off this expansion by # Finish off this expansion by
# adding indices for the vector/ # adding indices for the vector/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment