1 | initial version |
Thanks Everyone,
I fixed it. The problem was the Out file name in get_data() function:
class ChannelData: def init(self, fileName): self.timeChannelName = 'time'
temp0 = dyntools.CHNF(fileName , outvrsn = 1)
(short_title, chanid, chandata) = temp0.get_data()
temp = [short_title, dict(), dict()]
temp[1] = dict(chanid).copy()
temp[2] = dict(chandata).copy()
self.fileName = os.path.abspath(fileName)
self.titles = short_title.split("\n")
self.channelNameRef = dict(chanid).copy()
del self.channelNameRef[self.timeChannelName]
self.channelByName = dict([(self.channelNameRef[name], name) for name in self.channelNameRef.keys()])
self.channelData = dict()
self.n = len(temp[2][self.timeChannelName])
for cn in self.channelNameRef.keys():
values = temp[2][cn]
assert(self.n == len(values))
x = numpy.array(values)
if (numpy.isnan(x).any()):
raise Exception('NaN in channel %s' % cn)
self.channelData[cn] = x
self.time = numpy.array(temp[2][self.timeChannelName])
def getTime(self):
return self.time
def readChannel(self, channelName):
k = self.channelByName[channelName]
return self.channelData[k]
def hasChannel(self, channelName):
return self.channelByName.has_key(channelName)
2 | No.2 Revision |
Thanks Everyone,
Everyone, I fixed it. The problem was the Out file name in get_data() function:
class ChannelData: def init(self, fileName): self.timeChannelName = 'time'
temp0 = dyntools.CHNF(fileName , outvrsn = 1)
(short_title, chanid, chandata) = temp0.get_data()
temp = [short_title, dict(), dict()]
temp[1] = dict(chanid).copy()
temp[2] = dict(chandata).copy()
self.fileName = os.path.abspath(fileName)
self.titles = short_title.split("\n")
self.channelNameRef = dict(chanid).copy()
del self.channelNameRef[self.timeChannelName]
self.channelByName = dict([(self.channelNameRef[name], name) for name in self.channelNameRef.keys()])
self.channelData = dict()
self.n = len(temp[2][self.timeChannelName])
for cn in self.channelNameRef.keys():
values = temp[2][cn]
assert(self.n == len(values))
x = numpy.array(values)
if (numpy.isnan(x).any()):
raise Exception('NaN in channel %s' % cn)
self.channelData[cn] = x
self.time = numpy.array(temp[2][self.timeChannelName])
def getTime(self):
return self.time
def readChannel(self, channelName):
k = self.channelByName[channelName]
return self.channelData[k]
def hasChannel(self, channelName):
return self.channelByName.has_key(channelName)
3 | No.3 Revision |
Thanks Everyone, I fixed it. The problem was the Out file name in get_data() function:
function: class ChannelData: def init(self, fileName): self.timeChannelName = 'time'
temp0 = dyntools.CHNF(fileName , outvrsn = 1)
(short_title, chanid, chandata) = temp0.get_data()
temp = [short_title, dict(), dict()]
temp[1] = dict(chanid).copy()
temp[2] = dict(chandata).copy()
self.fileName = os.path.abspath(fileName)
self.titles = short_title.split("\n")
self.channelNameRef = dict(chanid).copy()
del self.channelNameRef[self.timeChannelName]
self.channelByName = dict([(self.channelNameRef[name], name) for name in self.channelNameRef.keys()])
self.channelData = dict()
self.n = len(temp[2][self.timeChannelName])
for cn in self.channelNameRef.keys():
values = temp[2][cn]
assert(self.n == len(values))
x = numpy.array(values)
if (numpy.isnan(x).any()):
raise Exception('NaN in channel %s' % cn)
self.channelData[cn] = x
self.time = numpy.array(temp[2][self.timeChannelName])
def getTime(self):
return self.time
def readChannel(self, channelName):
k = self.channelByName[channelName]
return self.channelData[k]
def hasChannel(self, channelName):
return self.channelByName.has_key(channelName)
4 | No.4 Revision |
Thanks Everyone, I fixed it. The problem was the Out file name in get_data() getdata() function:
class ChannelData:
def init(self, fileName):
self.timeChannelName = 'time'
'time'
temp0 = dyntools.CHNF(fileName , outvrsn = 1)
(short_title, (shorttitle, chanid, chandata) = temp0.get_data()
temp0.getdata()
temp = [short_title, [shorttitle, dict(), dict()]
temp[1] = dict(chanid).copy()
temp[2] = dict(chandata).copy()
self.fileName = os.path.abspath(fileName)
self.titles = short_title.split("\n")
self.channelNameRef = dict(chanid).copy()
del self.channelNameRef[self.timeChannelName]
self.channelByName = dict([(self.channelNameRef[name], name) for name in self.channelNameRef.keys()])
self.channelData = dict()
self.n = len(temp[2][self.timeChannelName])
for cn in self.channelNameRef.keys():
values = temp[2][cn]
assert(self.n == len(values))
x = numpy.array(values)
if (numpy.isnan(x).any()):
raise Exception('NaN in channel %s' % cn)
self.channelData[cn] = x
self.time = numpy.array(temp[2][self.timeChannelName])
def getTime(self):
return self.time
def readChannel(self, channelName):
k = self.channelByName[channelName]
return self.channelData[k]
self.channelData[k] 5 | No.5 Revision |
Thanks Everyone, I fixed it. The problem was the Out file name in getdata() function:
get_data() function:
class ChannelData:
def init(self, fileName):
self.timeChannelName = 'time'
temp0 = dyntools.CHNF(fileName , outvrsn = 1)
(shorttitle, chanid, chandata) = temp0.getdata()
temp = [shortdata()
temp = [shorttitle, dict(), dict()]
temp[1] = dict(chanid).copy()
temp[2] = dict(chandata).copy()
self.fileName = os.path.abspath(fileName)
self.titles = short_title.split("\n")
shorttitle.split("\n")
self.channelNameRef = dict(chanid).copy()
del self.channelNameRef[self.timeChannelName]
self.channelByName = dict([(self.channelNameRef[name], name) for name in self.channelNameRef.keys()])
self.channelData = dict()
self.n = len(temp[2][self.timeChannelName])
for cn in self.channelNameRef.keys():
values = temp[2][cn]
assert(self.n == len(values))
x = numpy.array(values)
if (numpy.isnan(x).any()):
raise Exception('NaN in channel %s' % cn)
self.channelData[cn] = x
self.time = numpy.array(temp[2][self.timeChannelName])
def getTime(self):
return self.time
def readChannel(self, channelName):
k = self.channelByName[channelName]
return self.channelData[k]
6 | No.6 Revision |
Thanks Everyone, I fixed it. The problem was the Out file name in get_data() function:
getdata() function:
#
class ChannelData:
def init(self, fileName):
self.timeChannelName = 'time'
temp0 = dyntools.CHNF(fileName , outvrsn = 1)
(shorttitle, chanid, chandata) = temp0.getdata()
temp = [shortdata()
temp = [shorttitle, dict(), dict()]
temp[1] = dict(chanid).copy()
temp[2] = dict(chandata).copy()
self.fileName = os.path.abspath(fileName)
self.titles = shorttitle.split("\n")
short_title.split("\n")
self.channelNameRef = dict(chanid).copy()
del self.channelNameRef[self.timeChannelName]
self.channelByName = dict([(self.channelNameRef[name], name) for name in self.channelNameRef.keys()])
self.channelData = dict()
self.n = len(temp[2][self.timeChannelName])
for cn in self.channelNameRef.keys():
values = temp[2][cn]
assert(self.n == len(values))
x = numpy.array(values)
if (numpy.isnan(x).any()):
raise Exception('NaN in channel %s' % cn)
self.channelData[cn] = x
self.time = numpy.array(temp[2][self.timeChannelName])
def getTime(self):
return self.time
def readChannel(self, channelName):
k = self.channelByName[channelName]
return self.channelData[k]
7 | No.7 Revision |
Thanks Everyone, I fixed it. The problem was the Out file name in getdata() function:
#
get_data() function:
class ChannelData:
def init(self, fileName):
self.timeChannelName = 'time'
temp0 = dyntools.CHNF(fileName , outvrsn = 1)
(shorttitle, chanid, chandata) = temp0.getdata()
temp = [shortdata()
temp = [shorttitle, dict(), dict()]
temp[1] = dict(chanid).copy()
temp[2] = dict(chandata).copy()
self.fileName = os.path.abspath(fileName)
self.titles = short_title.split("\n")
shorttitle.split("\n")
self.channelNameRef = dict(chanid).copy()
del self.channelNameRef[self.timeChannelName]
self.channelByName = dict([(self.channelNameRef[name], name) for name in self.channelNameRef.keys()])
self.channelData = dict()
self.n = len(temp[2][self.timeChannelName])
for cn in self.channelNameRef.keys():
values = temp[2][cn]
assert(self.n == len(values))
x = numpy.array(values)
if (numpy.isnan(x).any()):
raise Exception('NaN in channel %s' % cn)
self.channelData[cn] = x
self.time = numpy.array(temp[2][self.timeChannelName])
def getTime(self):
return self.time
def readChannel(self, channelName):
k = self.channelByName[channelName]
return self.channelData[k]
8 | No.8 Revision |
Thanks Everyone, I fixed it. The problem was the Out file name in get_data() function:
class ChannelData: def init(self, fileName): self.timeChannelName = 'time' temp0 = dyntools.CHNF(fileName , outvrsn = 1) (shorttitle, chanid, chandata) = temp0.getdata() temp = [shorttitle, dict(), dict()] temp[1] = dict(chanid).copy() temp[2] = dict(chandata).copy() self.fileName = os.path.abspath(fileName) self.titles = shorttitle.split("\n") self.channelNameRef = dict(chanid).copy() del self.channelNameRef[self.timeChannelName] self.channelByName = dict([(self.channelNameRef[name], name) for name in self.channelNameRef.keys()]) self.channelData = dict() self.n = len(temp[2][self.timeChannelName]) for cn in self.channelNameRef.keys(): values = temp[2][cn] assert(self.n == len(values)) x = numpy.array(values) if (numpy.isnan(x).any()): raise Exception('NaN in channel %s' % cn) self.channelData[cn] = x self.time = numpy.array(temp[2][self.timeChannelName]) def getTime(self): return self.time def readChannel(self, channelName): k = self.channelByName[channelName] return self.channelData[k]
9 | No.9 Revision |
Thanks Everyone, I fixed it. The problem was the Out file name in get_data() function:
class |class ChannelData:
| def init(self, fileName):
| self.timeChannelName = 'time'
| temp0 = dyntools.CHNF(fileName , outvrsn = 1)
| (shorttitle, chanid, chandata) = temp0.getdata()
| temp = [shorttitle, dict(), dict()]
| temp[1] = dict(chanid).copy()
| temp[2] = dict(chandata).copy()
| self.fileName = os.path.abspath(fileName)
| self.titles = shorttitle.split("\n")
| self.channelNameRef = dict(chanid).copy()
| del self.channelNameRef[self.timeChannelName]
| self.channelByName = dict([(self.channelNameRef[name], name) for name in self.channelNameRef.keys()])
| self.channelData = dict()
| self.n = len(temp[2][self.timeChannelName])
| for cn in self.channelNameRef.keys():
| values = temp[2][cn]
| assert(self.n == len(values))
| x = numpy.array(values)
| if (numpy.isnan(x).any()):
| raise Exception('NaN in channel %s' % cn)
| self.channelData[cn] = x
| self.time = numpy.array(temp[2][self.timeChannelName])
| def getTime(self):
| return self.time
| def readChannel(self, channelName):
| k = self.channelByName[channelName]
| return self.channelData[k]self.channelData[k]
|
10 | No.10 Revision |
Thanks Everyone, I fixed it. The problem was the Out file name in get_data() function:
|class ChannelData:
| class ChannelData:
def init(self, __init__(self, fileName):
| self.timeChannelName = 'time'
| temp0 = dyntools.CHNF(fileName , outvrsn = 1)
| (shorttitle, (short_title, chanid, chandata) = temp0.getdata()
| temp0.get_data()
temp = [shorttitle, [short_title, dict(), dict()]
| temp[1] = dict(chanid).copy()
| temp[2] = dict(chandata).copy()
| self.fileName = os.path.abspath(fileName)
| self.titles = shorttitle.split("\n")
| short_title.split("\n")
self.channelNameRef = dict(chanid).copy()
| del self.channelNameRef[self.timeChannelName]
| self.channelByName = dict([(self.channelNameRef[name], name) for name in self.channelNameRef.keys()])
| self.channelData = dict()
| self.n = len(temp[2][self.timeChannelName])
| for cn in self.channelNameRef.keys():
| values = temp[2][cn]
| assert(self.n == len(values))
| x = numpy.array(values)
| if (numpy.isnan(x).any()):
| raise Exception('NaN in channel %s' % cn)
| self.channelData[cn] = x
| self.time = numpy.array(temp[2][self.timeChannelName])
| def getTime(self):
| return self.time
| def readChannel(self, channelName):
| k = self.channelByName[channelName]
| return self.channelData[k]
|