@@ -124,7 +124,7 class PlotManager(): | |||
|
124 | 124 | subtitle = "%s:\n" %(name) |
|
125 | 125 | subtitle += "Hostname: %s\n" %socket.gethostbyname(socket.gethostname()) |
|
126 | 126 | subtitle += "Working directory: %s\n" %os.path.abspath("./") |
|
127 | # subtitle += "Configuration file: %s\n" %self.filename | |
|
127 | # subtitle += "Configuration file: %s\n" %self.filename | |
|
128 | 128 | subtitle += "Time: %s\n" %str(datetime.datetime.now()) |
|
129 | 129 | |
|
130 | 130 | adminObj = schainpy.admin.SchainNotify() |
@@ -618,7 +618,7 class JRODataReader(JRODataIO): | |||
|
618 | 618 | dateList, pathList = self.findDatafiles(path, startDate, endDate, expLabel, ext, walk, include_path=True) |
|
619 | 619 | |
|
620 | 620 | if dateList == []: |
|
621 | # print "[Reading] Date range selected invalid [%s - %s]: No *%s files in %s)" %(startDate, endDate, ext, path) | |
|
621 | # print "[Reading] Date range selected invalid [%s - %s]: No *%s files in %s)" %(startDate, endDate, ext, path) | |
|
622 | 622 | return None, None |
|
623 | 623 | |
|
624 | 624 | if len(dateList) > 1: |
@@ -630,7 +630,7 class JRODataReader(JRODataIO): | |||
|
630 | 630 | datetimeList = [] |
|
631 | 631 | |
|
632 | 632 | for thisPath in pathList: |
|
633 | # thisPath = pathList[pathDict[file]] | |
|
633 | # thisPath = pathList[pathDict[file]] | |
|
634 | 634 | |
|
635 | 635 | fileList = glob.glob1(thisPath, "*%s" %ext) |
|
636 | 636 | fileList.sort() |
@@ -746,7 +746,7 class JRODataReader(JRODataIO): | |||
|
746 | 746 | idFile += 1 |
|
747 | 747 | if not(idFile < len(self.filenameList)): |
|
748 | 748 | self.flagNoMoreFiles = 1 |
|
749 | # print "[Reading] No more Files" | |
|
749 | # print "[Reading] No more Files" | |
|
750 | 750 | return 0 |
|
751 | 751 | |
|
752 | 752 | filename = self.filenameList[idFile] |
@@ -764,7 +764,7 class JRODataReader(JRODataIO): | |||
|
764 | 764 | self.fileSize = fileSize |
|
765 | 765 | self.fp = fp |
|
766 | 766 | |
|
767 | # print "[Reading] Setting the file: %s"%self.filename | |
|
767 | # print "[Reading] Setting the file: %s"%self.filename | |
|
768 | 768 | |
|
769 | 769 | return 1 |
|
770 | 770 | |
@@ -847,14 +847,14 class JRODataReader(JRODataIO): | |||
|
847 | 847 | if self.fp != None: self.fp.close() |
|
848 | 848 | self.fp = open(fullfilename, 'rb') |
|
849 | 849 | self.flagNoMoreFiles = 0 |
|
850 | # print '[Reading] Setting the file: %s' % fullfilename | |
|
850 | # print '[Reading] Setting the file: %s' % fullfilename | |
|
851 | 851 | else: |
|
852 | 852 | self.fileSize = 0 |
|
853 | 853 | self.filename = None |
|
854 | 854 | self.flagIsNewFile = 0 |
|
855 | 855 | self.fp = None |
|
856 | 856 | self.flagNoMoreFiles = 1 |
|
857 | # print '[Reading] No more files to read' | |
|
857 | # print '[Reading] No more files to read' | |
|
858 | 858 | |
|
859 | 859 | return fileOk_flag |
|
860 | 860 | |
@@ -907,7 +907,7 class JRODataReader(JRODataIO): | |||
|
907 | 907 | return 1 |
|
908 | 908 | |
|
909 | 909 | if self.fileSize == self.fileSizeByHeader: |
|
910 | # self.flagEoF = True | |
|
910 | # self.flagEoF = True | |
|
911 | 911 | return 0 |
|
912 | 912 | |
|
913 | 913 | print "[Reading] Waiting %0.2f seconds for the next block, try %03d ..." % (self.delay, nTries+1) |
@@ -962,11 +962,11 class JRODataReader(JRODataIO): | |||
|
962 | 962 | self.fp.seek(self.fp.tell() - neededsize) |
|
963 | 963 | break |
|
964 | 964 | |
|
965 | # csize = self.fileSize - self.fp.tell() | |
|
966 | # neededsize = self.processingHeaderObj.blockSize + self.basicHeaderSize | |
|
967 | # factor = int(csize/neededsize) | |
|
968 | # if factor > 0: | |
|
969 | # self.fp.seek(self.fp.tell() + factor*neededsize) | |
|
965 | # csize = self.fileSize - self.fp.tell() | |
|
966 | # neededsize = self.processingHeaderObj.blockSize + self.basicHeaderSize | |
|
967 | # factor = int(csize/neededsize) | |
|
968 | # if factor > 0: | |
|
969 | # self.fp.seek(self.fp.tell() + factor*neededsize) | |
|
970 | 970 | |
|
971 | 971 | self.flagIsNewFile = 0 |
|
972 | 972 | self.__isFirstTimeOnline = 0 |
@@ -976,8 +976,8 class JRODataReader(JRODataIO): | |||
|
976 | 976 | if self.fp == None: |
|
977 | 977 | return 0 |
|
978 | 978 | |
|
979 | # if self.online: | |
|
980 | # self.__jumpToLastBlock() | |
|
979 | # if self.online: | |
|
980 | # self.__jumpToLastBlock() | |
|
981 | 981 | |
|
982 | 982 | if self.flagIsNewFile: |
|
983 | 983 | self.lastUTTime = self.basicHeaderObj.utc |
@@ -1069,8 +1069,8 class JRODataReader(JRODataIO): | |||
|
1069 | 1069 | self.dtype = datatype_str |
|
1070 | 1070 | #self.ippSeconds = 2 * 1000 * self.radarControllerHeaderObj.ipp / self.c |
|
1071 | 1071 | self.fileSizeByHeader = self.processingHeaderObj.dataBlocksPerFile * self.processingHeaderObj.blockSize + self.firstHeaderSize + self.basicHeaderSize*(self.processingHeaderObj.dataBlocksPerFile - 1) |
|
1072 | # self.dataOut.channelList = numpy.arange(self.systemHeaderObj.numChannels) | |
|
1073 | # self.dataOut.channelIndexList = numpy.arange(self.systemHeaderObj.numChannels) | |
|
1072 | # self.dataOut.channelList = numpy.arange(self.systemHeaderObj.numChannels) | |
|
1073 | # self.dataOut.channelIndexList = numpy.arange(self.systemHeaderObj.numChannels) | |
|
1074 | 1074 | self.getBlockDimension() |
|
1075 | 1075 | |
|
1076 | 1076 | def __verifyFile(self, filename, msgFlag=True): |
@@ -1331,7 +1331,7 class JRODataReader(JRODataIO): | |||
|
1331 | 1331 | self.filenameList = [] |
|
1332 | 1332 | return |
|
1333 | 1333 | |
|
1334 | # self.getBasicHeader() | |
|
1334 | # self.getBasicHeader() | |
|
1335 | 1335 | |
|
1336 | 1336 | if last_set != None: |
|
1337 | 1337 | self.dataOut.last_block = last_set * self.processingHeaderObj.dataBlocksPerFile + self.basicHeaderObj.dataBlock |
General Comments 0
You need to be logged in to leave comments.
Login now