Skip to content
Snippets Groups Projects
Commit 30dd9994 authored by Eddie McWhirter's avatar Eddie McWhirter
Browse files

Move logic for total minute time output to value formatter.

parent 6f0e3feb
No related branches found
No related tags found
No related merge requests found
......@@ -77,7 +77,7 @@ class PCDCPWriter(object):
for i in xrange(len(traces[0].data)):
buf.append(self._format_values(
datetime.utcfromtimestamp(starttime + i * delta),
(int(round(t.data[i]*100)) for t in traces)))
(t.data[i] for t in traces)))
return ''.join(buf)
......@@ -98,11 +98,11 @@ class PCDCPWriter(object):
Formatted line containing values.
"""
tt = time.timetuple()
totalMinutes = tt.tm_hour * 60 + tt.tm_min
totalMinutes = int(tt.tm_hour * 60 + tt.tm_min)
return '{0:0>4d} ' \
'{2: >8d} {3: >8d} {4: >8d} {5: >8d}\n'.format(
totalMinutes, int(time.microsecond / 1000),
*[self.empty_value if numpy.isnan(val) else val
*[self.empty_value if numpy.isnan(val) else int(round(val*100))
for val in values])
@classmethod
......
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