Commit c838fce4 authored by Javier Quinteros's avatar Javier Quinteros

Bugfix: Starttime read from filename and NOT from GPS measurement

Previously the start time was read from the GPS measurement stored in
the metadata, but this differed from the filename. The filename is now
being used instead as it seems to be what is considered proper.
Solve issue with __sampleend method. It has the last real sample to
process, not with the "range" semantic (last not considered).
parent eb6bddaa
......@@ -143,7 +143,7 @@ class TDMS(object):'Opening %s; Startime: %s' % (self.__available[self.__currentfile]['name'], self.__twstart))
# Reset some properties before opening the new file
self.starttime = None
self.starttime = self.__available[self.__currentfile]['dt']
self.endtime = None
self.metadata = dict()
......@@ -329,7 +329,7 @@ class TDMS(object):
while (self.__twend is None) or (self.__twstart < self.__twend):
# Loop through channels
while self.__samplecur < self.__sampleend:
while self.__samplecur <= self.__sampleend:
for ch in range(self.__chstart, self.__chstop+1, self.__chstep):
data = self.__readdata(channel=ch)
stats = {'network': 'XX', 'station': '%05d' % ch, 'location': '',
......@@ -23,7 +23,7 @@ setup(
# Versions should comply with PEP440. For a discussion on single-sourcing
# the version across and the project code, see
description='dasscripts: Scripts to work with data generated by DAS systems',
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment