From 889c94859eaeb6c793c7588b81f5306500a3e720 2018-07-03 21:51:32 From: George Yong Date: 2018-07-03 21:51:32 Subject: [PATCH] Python 2to3, Voltage (all operations) working --- diff --git a/schainpy/model/data/jroheaderIO.py b/schainpy/model/data/jroheaderIO.py index bdb5905..4d1eeca 100644 --- a/schainpy/model/data/jroheaderIO.py +++ b/schainpy/model/data/jroheaderIO.py @@ -439,7 +439,6 @@ class RadarControllerHeader(Header): return 0 for ib in range(self.nBaud - 1, -1, -1): - log.error(ib / 32) code[ic, ib] = temp[int(ib / 32)] % 2 temp[int(ib / 32)] = temp[int(ib / 32)] / 2 diff --git a/schainpy/model/proc/jroproc_voltage.py b/schainpy/model/proc/jroproc_voltage.py index d241c3a..ef624c8 100644 --- a/schainpy/model/proc/jroproc_voltage.py +++ b/schainpy/model/proc/jroproc_voltage.py @@ -6,6 +6,8 @@ from scipy import interpolate from .jroproc_base import ProcessingUnit, Operation from schainpy.model.data.jrodata import Voltage from time import time +from schainpy.utils import log + class VoltageProc(ProcessingUnit): @@ -1101,8 +1103,7 @@ class SplitProfiles(Operation): if shape[2] % n != 0: raise ValueError("Could not split the data, n=%d has to be multiple of %d" %(n, shape[2])) - new_shape = shape[0], shape[1]*n, shape[2]/n - + new_shape = shape[0], shape[1]*n, int(shape[2]/n) dataOut.data = numpy.reshape(dataOut.data, new_shape) dataOut.flagNoData = False