@@ -0,0 +1,69 | |||
|
1 | { | |
|
2 | "configurations": [ | |
|
3 | { | |
|
4 | "name": "Mac", | |
|
5 | "includePath": [ | |
|
6 | "/usr/include", | |
|
7 | "/usr/local/include", | |
|
8 | "${workspaceRoot}" | |
|
9 | ], | |
|
10 | "defines": [], | |
|
11 | "intelliSenseMode": "clang-x64", | |
|
12 | "browse": { | |
|
13 | "path": [ | |
|
14 | "/usr/include", | |
|
15 | "/usr/local/include", | |
|
16 | "${workspaceRoot}" | |
|
17 | ], | |
|
18 | "limitSymbolsToIncludedHeaders": true, | |
|
19 | "databaseFilename": "" | |
|
20 | } | |
|
21 | }, | |
|
22 | { | |
|
23 | "name": "Linux", | |
|
24 | "includePath": [ | |
|
25 | "/usr/include/c++/4.8.4", | |
|
26 | "/usr/include/x86_64-linux-gnu/c++/4.8", | |
|
27 | "/usr/local/include", | |
|
28 | "/usr/include", | |
|
29 | "/usr/include/x86_64-linux-gnu", | |
|
30 | "${workspaceRoot}" | |
|
31 | ], | |
|
32 | "defines": [], | |
|
33 | "intelliSenseMode": "clang-x64", | |
|
34 | "browse": { | |
|
35 | "path": [ | |
|
36 | "/usr/include/c++/4.8.4", | |
|
37 | "/usr/include/x86_64-linux-gnu/c++/4.8", | |
|
38 | "/usr/local/include", | |
|
39 | "/usr/include", | |
|
40 | "/usr/include/x86_64-linux-gnu", | |
|
41 | "${workspaceRoot}" | |
|
42 | ], | |
|
43 | "limitSymbolsToIncludedHeaders": true, | |
|
44 | "databaseFilename": "" | |
|
45 | } | |
|
46 | }, | |
|
47 | { | |
|
48 | "name": "Win32", | |
|
49 | "includePath": [ | |
|
50 | "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include", | |
|
51 | "${workspaceRoot}" | |
|
52 | ], | |
|
53 | "defines": [ | |
|
54 | "_DEBUG", | |
|
55 | "UNICODE" | |
|
56 | ], | |
|
57 | "intelliSenseMode": "msvc-x64", | |
|
58 | "browse": { | |
|
59 | "path": [ | |
|
60 | "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include/*", | |
|
61 | "${workspaceRoot}" | |
|
62 | ], | |
|
63 | "limitSymbolsToIncludedHeaders": true, | |
|
64 | "databaseFilename": "" | |
|
65 | } | |
|
66 | } | |
|
67 | ], | |
|
68 | "version": 2 | |
|
69 | } No newline at end of file |
@@ -0,0 +1,7 | |||
|
1 | { | |
|
2 | "files.associations": { | |
|
3 | "arrayobject.h": "c", | |
|
4 | "ndarrayobject.h": "c", | |
|
5 | "complex": "c" | |
|
6 | } | |
|
7 | } No newline at end of file |
@@ -100,10 +100,19 ENV/ | |||
|
100 | 100 | # eclipse |
|
101 | 101 | .project |
|
102 | 102 | .pydevproject |
|
103 | <<<<<<< HEAD | |
|
103 | 104 | |
|
104 | 105 | # vscode |
|
105 | 106 | |
|
106 | 107 | .vscode |
|
107 | 108 | |
|
108 | 109 | schainpy/scripts/ |
|
109 | schaingui/node_modules/ No newline at end of file | |
|
110 | schaingui/node_modules/ | |
|
111 | ======= | |
|
112 | .svn/ | |
|
113 | *.png | |
|
114 | *.pyc | |
|
115 | schainpy/scripts | |
|
116 | ||
|
117 | schaingui/node_modules | |
|
118 | >>>>>>> master |
@@ -129,4 +129,4 op.addParameter(name='wintitle', value='RTI', format='str') | |||
|
129 | 129 | |
|
130 | 130 | controller.start() |
|
131 | 131 | |
|
132 |
``` |
|
|
132 | ``` No newline at end of file |
@@ -333,10 +333,10 class OperationConf(): | |||
|
333 | 333 | def getParameterValue(self, parameterName): |
|
334 | 334 | |
|
335 | 335 | parameterObj = self.getParameterObj(parameterName) |
|
336 | ||
|
336 | ||
|
337 | 337 | # if not parameterObj: |
|
338 |
|
|
|
339 | ||
|
338 | # return None | |
|
339 | ||
|
340 | 340 | value = parameterObj.getValue() |
|
341 | 341 | |
|
342 | 342 | return value |
@@ -654,11 +654,11 class ProcUnitConf(): | |||
|
654 | 654 | def printattr(self): |
|
655 | 655 | |
|
656 | 656 | print "%s[%s]: name = %s, datatype = %s, inputId = %s" %(self.ELEMENTNAME, |
|
657 | self.id, | |
|
658 | self.name, | |
|
659 | self.datatype, | |
|
660 | self.inputId) | |
|
661 | ||
|
657 | self.id, | |
|
658 | self.name, | |
|
659 | self.datatype, | |
|
660 | self.inputId) | |
|
661 | ||
|
662 | 662 | for opConfObj in self.opConfObjList: |
|
663 | 663 | opConfObj.printattr() |
|
664 | 664 | |
@@ -714,13 +714,13 class ProcUnitConf(): | |||
|
714 | 714 | sts = self.procUnitObj.call(opType = opConfObj.type, |
|
715 | 715 | opName = opConfObj.name, |
|
716 | 716 | opId = opConfObj.id, |
|
717 | ) | |
|
718 | ||
|
719 | # total_time = time.time() - ini | |
|
720 | # | |
|
721 | # if total_time > 0.002: | |
|
722 | # print "%s::%s took %f seconds" %(self.name, opConfObj.name, total_time) | |
|
723 | ||
|
717 | **kwargs) | |
|
718 | ||
|
719 | # total_time = time.time() - ini | |
|
720 | # | |
|
721 | # if total_time > 0.002: | |
|
722 | # print "%s::%s took %f seconds" %(self.name, opConfObj.name, total_time) | |
|
723 | ||
|
724 | 724 | is_ok = is_ok or sts |
|
725 | 725 | |
|
726 | 726 | return is_ok |
@@ -866,18 +866,18 class ReadUnitConf(ProcUnitConf): | |||
|
866 | 866 | opObj.addParameter(name=key, value=value, format=type(value).__name__) |
|
867 | 867 | |
|
868 | 868 | return opObj |
|
869 | ||
|
869 | ||
|
870 | 870 | # def makeXml(self, projectElement): |
|
871 | # | |
|
871 | # | |
|
872 | 872 | # procUnitElement = SubElement(projectElement, self.ELEMENTNAME) |
|
873 | 873 | # procUnitElement.set('id', str(self.id)) |
|
874 | 874 | # procUnitElement.set('name', self.name) |
|
875 | 875 | # procUnitElement.set('datatype', self.datatype) |
|
876 | 876 | # procUnitElement.set('inputId', str(self.inputId)) |
|
877 | # | |
|
877 | # | |
|
878 | 878 | # for opConfObj in self.opConfObjList: |
|
879 | 879 | # opConfObj.makeXml(procUnitElement) |
|
880 | ||
|
880 | ||
|
881 | 881 | def readXml(self, upElement): |
|
882 | 882 | |
|
883 | 883 | self.id = upElement.get('id') |
@@ -1119,8 +1119,8 class Project(): | |||
|
1119 | 1119 | |
|
1120 | 1120 | self.id = self.projectElement.get('id') |
|
1121 | 1121 | self.name = self.projectElement.get('name') |
|
1122 | self.description = self.projectElement.get('description') | |
|
1123 | ||
|
1122 | self.description = self.projectElement.get('description') | |
|
1123 | ||
|
1124 | 1124 | readUnitElementList = self.projectElement.iter(ReadUnitConf().getElementName()) |
|
1125 | 1125 | |
|
1126 | 1126 | for readUnitElement in readUnitElementList: |
@@ -1150,8 +1150,8 class Project(): | |||
|
1150 | 1150 | def printattr(self): |
|
1151 | 1151 | |
|
1152 | 1152 | print "Project[%s]: name = %s, description = %s" %(self.id, |
|
1153 |
|
|
|
1154 |
|
|
|
1153 | self.name, | |
|
1154 | self.description) | |
|
1155 | 1155 | |
|
1156 | 1156 | for procUnitConfObj in self.procUnitConfObjDict.values(): |
|
1157 | 1157 | procUnitConfObj.printattr() |
@@ -1188,9 +1188,9 class Project(): | |||
|
1188 | 1188 | import socket |
|
1189 | 1189 | |
|
1190 | 1190 | err = traceback.format_exception(sys.exc_info()[0], |
|
1191 |
|
|
|
1192 |
|
|
|
1193 | ||
|
1191 | sys.exc_info()[1], | |
|
1192 | sys.exc_info()[2]) | |
|
1193 | ||
|
1194 | 1194 | print "***** Error occurred in %s *****" %(procUnitConfObj.name) |
|
1195 | 1195 | print "***** %s" %err[-1] |
|
1196 | 1196 | |
@@ -1221,10 +1221,10 class Project(): | |||
|
1221 | 1221 | |
|
1222 | 1222 | adminObj = schainpy.admin.SchainNotify() |
|
1223 | 1223 | adminObj.sendAlert(message=message, |
|
1224 |
|
|
|
1225 |
|
|
|
1226 |
|
|
|
1227 | ||
|
1224 | subject=subject, | |
|
1225 | subtitle=subtitle, | |
|
1226 | filename=self.filename) | |
|
1227 | ||
|
1228 | 1228 | def isPaused(self): |
|
1229 | 1229 | return 0 |
|
1230 | 1230 |
@@ -14,8 +14,8 class ControllerThread(threading.Thread, Project): | |||
|
14 | 14 | self.setDaemon(True) |
|
15 | 15 | |
|
16 | 16 | self.lock = threading.Lock() |
|
17 | self.control = {'stop':False, 'pause':False} | |
|
18 | ||
|
17 | self.control = { 'stop':False, 'pause':False } | |
|
18 | ||
|
19 | 19 | def __del__(self): |
|
20 | 20 | |
|
21 | 21 | self.control['stop'] = True |
@@ -90,7 +90,7 class ControllerThread(threading.Thread, Project): | |||
|
90 | 90 | continue |
|
91 | 91 | |
|
92 | 92 | if thisOpObj.name in plotterList: |
|
93 |
thisOpObj.type = " |
|
|
93 | thisOpObj.type = "other" | |
|
94 | 94 | |
|
95 | 95 | def setPlotterQueue(self, plotter_queue): |
|
96 | 96 |
@@ -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() |
@@ -625,7 +625,7 class JRODataReader(JRODataIO): | |||
|
625 | 625 | dateList, pathList = self.findDatafiles(path, startDate, endDate, expLabel, ext, walk, include_path=True) |
|
626 | 626 | |
|
627 | 627 | if dateList == []: |
|
628 | # print "[Reading] Date range selected invalid [%s - %s]: No *%s files in %s)" %(startDate, endDate, ext, path) | |
|
628 | # print "[Reading] Date range selected invalid [%s - %s]: No *%s files in %s)" %(startDate, endDate, ext, path) | |
|
629 | 629 | return None, None |
|
630 | 630 | |
|
631 | 631 | if len(dateList) > 1: |
@@ -637,8 +637,8 class JRODataReader(JRODataIO): | |||
|
637 | 637 | datetimeList = [] |
|
638 | 638 | |
|
639 | 639 | for thisPath in pathList: |
|
640 | # thisPath = pathList[pathDict[file]] | |
|
641 | ||
|
640 | # thisPath = pathList[pathDict[file]] | |
|
641 | ||
|
642 | 642 | fileList = glob.glob1(thisPath, "*%s" %ext) |
|
643 | 643 | fileList.sort() |
|
644 | 644 | |
@@ -767,7 +767,7 class JRODataReader(JRODataIO): | |||
|
767 | 767 | idFile += 1 |
|
768 | 768 | if not(idFile < len(self.filenameList)): |
|
769 | 769 | self.flagNoMoreFiles = 1 |
|
770 | # print "[Reading] No more Files" | |
|
770 | # print "[Reading] No more Files" | |
|
771 | 771 | return 0 |
|
772 | 772 | |
|
773 | 773 | filename = self.filenameList[idFile] |
@@ -785,7 +785,7 class JRODataReader(JRODataIO): | |||
|
785 | 785 | self.fileSize = fileSize |
|
786 | 786 | self.fp = fp |
|
787 | 787 | |
|
788 | # print "[Reading] Setting the file: %s"%self.filename | |
|
788 | # print "[Reading] Setting the file: %s"%self.filename | |
|
789 | 789 | |
|
790 | 790 | return 1 |
|
791 | 791 | |
@@ -868,14 +868,14 class JRODataReader(JRODataIO): | |||
|
868 | 868 | if self.fp != None: self.fp.close() |
|
869 | 869 | self.fp = open(fullfilename, 'rb') |
|
870 | 870 | self.flagNoMoreFiles = 0 |
|
871 | # print '[Reading] Setting the file: %s' % fullfilename | |
|
871 | # print '[Reading] Setting the file: %s' % fullfilename | |
|
872 | 872 | else: |
|
873 | 873 | self.fileSize = 0 |
|
874 | 874 | self.filename = None |
|
875 | 875 | self.flagIsNewFile = 0 |
|
876 | 876 | self.fp = None |
|
877 | 877 | self.flagNoMoreFiles = 1 |
|
878 | # print '[Reading] No more files to read' | |
|
878 | # print '[Reading] No more files to read' | |
|
879 | 879 | |
|
880 | 880 | return fileOk_flag |
|
881 | 881 | |
@@ -929,7 +929,7 class JRODataReader(JRODataIO): | |||
|
929 | 929 | return 1 |
|
930 | 930 | |
|
931 | 931 | if self.fileSize == self.fileSizeByHeader: |
|
932 | # self.flagEoF = True | |
|
932 | # self.flagEoF = True | |
|
933 | 933 | return 0 |
|
934 | 934 | |
|
935 | 935 | print "[Reading] Waiting %0.2f seconds for the next block, try %03d ..." % (self.delay, nTries+1) |
@@ -983,13 +983,13 class JRODataReader(JRODataIO): | |||
|
983 | 983 | else: |
|
984 | 984 | self.fp.seek(self.fp.tell() - neededsize) |
|
985 | 985 | break |
|
986 | ||
|
987 | # csize = self.fileSize - self.fp.tell() | |
|
988 | # neededsize = self.processingHeaderObj.blockSize + self.basicHeaderSize | |
|
989 | # factor = int(csize/neededsize) | |
|
990 | # if factor > 0: | |
|
991 | # self.fp.seek(self.fp.tell() + factor*neededsize) | |
|
992 | ||
|
986 | ||
|
987 | # csize = self.fileSize - self.fp.tell() | |
|
988 | # neededsize = self.processingHeaderObj.blockSize + self.basicHeaderSize | |
|
989 | # factor = int(csize/neededsize) | |
|
990 | # if factor > 0: | |
|
991 | # self.fp.seek(self.fp.tell() + factor*neededsize) | |
|
992 | ||
|
993 | 993 | self.flagIsNewFile = 0 |
|
994 | 994 | self.__isFirstTimeOnline = 0 |
|
995 | 995 | |
@@ -997,10 +997,10 class JRODataReader(JRODataIO): | |||
|
997 | 997 | #if self.server is None: |
|
998 | 998 | if self.fp == None: |
|
999 | 999 | return 0 |
|
1000 | ||
|
1001 | # if self.online: | |
|
1002 |
# self.__jumpToLastBlock() |
|
|
1003 | ||
|
1000 | ||
|
1001 | # if self.online: | |
|
1002 | # self.__jumpToLastBlock() | |
|
1003 | ||
|
1004 | 1004 | if self.flagIsNewFile: |
|
1005 | 1005 | self.lastUTTime = self.basicHeaderObj.utc |
|
1006 | 1006 | return 1 |
@@ -1063,8 +1063,8 class JRODataReader(JRODataIO): | |||
|
1063 | 1063 | |
|
1064 | 1064 | if self.verbose: |
|
1065 | 1065 | print "[Reading] Block No. %d/%d -> %s" %(self.nReadBlocks, |
|
1066 |
|
|
|
1067 |
|
|
|
1066 | self.processingHeaderObj.dataBlocksPerFile, | |
|
1067 | self.dataOut.datatime.ctime()) | |
|
1068 | 1068 | return 1 |
|
1069 | 1069 | |
|
1070 | 1070 | def __readFirstHeader(self): |
@@ -1095,8 +1095,8 class JRODataReader(JRODataIO): | |||
|
1095 | 1095 | self.dtype = datatype_str |
|
1096 | 1096 | #self.ippSeconds = 2 * 1000 * self.radarControllerHeaderObj.ipp / self.c |
|
1097 | 1097 | self.fileSizeByHeader = self.processingHeaderObj.dataBlocksPerFile * self.processingHeaderObj.blockSize + self.firstHeaderSize + self.basicHeaderSize*(self.processingHeaderObj.dataBlocksPerFile - 1) |
|
1098 | # self.dataOut.channelList = numpy.arange(self.systemHeaderObj.numChannels) | |
|
1099 | # self.dataOut.channelIndexList = numpy.arange(self.systemHeaderObj.numChannels) | |
|
1098 | # self.dataOut.channelList = numpy.arange(self.systemHeaderObj.numChannels) | |
|
1099 | # self.dataOut.channelIndexList = numpy.arange(self.systemHeaderObj.numChannels) | |
|
1100 | 1100 | self.getBlockDimension() |
|
1101 | 1101 | |
|
1102 | 1102 | def __verifyFile(self, filename, msgFlag=True): |
@@ -1329,11 +1329,11 class JRODataReader(JRODataIO): | |||
|
1329 | 1329 | skip=skip, queue=queue) |
|
1330 | 1330 | |
|
1331 | 1331 | if not(pathList): |
|
1332 | # print "[Reading] No *%s files in %s (%s - %s)"%(ext, path, | |
|
1333 | # datetime.datetime.combine(startDate,startTime).ctime(), | |
|
1334 | # datetime.datetime.combine(endDate,endTime).ctime()) | |
|
1332 | # print "[Reading] No *%s files in %s (%s - %s)"%(ext, path, | |
|
1333 | # datetime.datetime.combine(startDate,startTime).ctime(), | |
|
1334 | # datetime.datetime.combine(endDate,endTime).ctime()) | |
|
1335 | 1335 | |
|
1336 | # sys.exit(-1) | |
|
1336 | # sys.exit(-1) | |
|
1337 | 1337 | |
|
1338 | 1338 | self.fileIndex = -1 |
|
1339 | 1339 | self.pathList = [] |
@@ -1378,10 +1378,10 class JRODataReader(JRODataIO): | |||
|
1378 | 1378 | self.filenameList = [] |
|
1379 | 1379 | return |
|
1380 | 1380 | |
|
1381 |
|
|
|
1381 | # self.getBasicHeader() | |
|
1382 | 1382 | |
|
1383 |
|
|
|
1384 |
|
|
|
1383 | if last_set != None: | |
|
1384 | self.dataOut.last_block = last_set * self.processingHeaderObj.dataBlocksPerFile + self.basicHeaderObj.dataBlock | |
|
1385 | 1385 | return |
|
1386 | 1386 | |
|
1387 | 1387 | def getBasicHeader(self): |
@@ -638,18 +638,20 class SendToServer(ProcessingUnit): | |||
|
638 | 638 | return fullfilenameList |
|
639 | 639 | |
|
640 | 640 | def run(self, **kwargs): |
|
641 | ||
|
642 | 641 | if not self.isConfig: |
|
643 | 642 | self.init = time.time() |
|
644 | 643 | self.setup(**kwargs) |
|
645 | 644 | self.isConfig = True |
|
646 | ||
|
645 | ||
|
646 | if not self.clientObj.is_alive(): | |
|
647 | print "[Remote Server]: Restarting connection " | |
|
648 | self.setup(**kwargs) | |
|
649 | ||
|
647 | 650 | if time.time() - self.init >= self.period: |
|
648 | 651 | fullfilenameList = self.findFiles() |
|
649 | 652 | |
|
650 | 653 | if self.clientObj.updateFileList(fullfilenameList): |
|
651 | 654 | print "[Remote Server]: Sending the next files ", str(fullfilenameList) |
|
652 | ||
|
653 | 655 | self.init = time.time() |
|
654 | 656 | |
|
655 | 657 | def close(self): |
@@ -93,7 +93,11 def filterOffsets(offsets0, stdvLimit): | |||
|
93 | 93 | |
|
94 | 94 | #---------------------- Setup --------------------------- |
|
95 | 95 | |
|
96 | <<<<<<< HEAD | |
|
96 | 97 | path = '/home/nanosat/Pictures/JASMET30_mp/201608/phase' |
|
98 | ======= | |
|
99 | path = '/home/jespinoza/Pictures/JASMET30/201608/phase' | |
|
100 | >>>>>>> master | |
|
97 | 101 | stdvLimit = 0.5 |
|
98 | 102 | |
|
99 | 103 | #---------------------- Script --------------------------- |
General Comments 0
You need to be logged in to leave comments.
Login now