@@ -740,19 +740,23 class ProfileSelector(Operation): | |||
|
740 | 740 | |
|
741 | 741 | |
|
742 | 742 | class Reshaper(Operation): |
|
743 | ||
|
743 | 744 | def __init__(self): |
|
745 | ||
|
744 | 746 | Operation.__init__(self) |
|
745 |
self.updateNewHeights = |
|
|
747 | self.updateNewHeights = True | |
|
746 | 748 | |
|
747 | 749 | def run(self, dataOut, shape): |
|
750 | ||
|
748 | 751 | shape_tuple = tuple(shape) |
|
749 | 752 | dataOut.data = numpy.reshape(dataOut.data, shape_tuple) |
|
750 | 753 | dataOut.flagNoData = False |
|
751 | 754 | |
|
752 |
if |
|
|
755 | if self.updateNewHeights: | |
|
756 | ||
|
753 | 757 | old_nheights = dataOut.nHeights |
|
754 | 758 | new_nheights = dataOut.data.shape[2] |
|
755 | factor = new_nheights / old_nheights | |
|
759 | factor = 1.0*new_nheights / old_nheights | |
|
756 | 760 | deltaHeight = dataOut.heightList[1] - dataOut.heightList[0] |
|
757 | 761 | xf = dataOut.heightList[0] + dataOut.nHeights * deltaHeight * factor |
|
758 | 762 | dataOut.heightList = numpy.arange(dataOut.heightList[0], xf, deltaHeight) No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now