This diff has been collapsed as it changes many lines, (709 lines changed) Show them Hide them | |||
@@ -3,7 +3,9 | |||
|
3 | 3 | Module implementing MainWindow. |
|
4 | 4 | #+++++++++++++INTERFAZ DE USUARIO V1.1++++++++++++++# |
|
5 | 5 | """ |
|
6 | import os | |
|
6 | import os,sys | |
|
7 | ||
|
8 | ||
|
7 | 9 | import datetime |
|
8 | 10 | |
|
9 | 11 | from PyQt4.QtGui import QMainWindow |
@@ -17,7 +19,16 from modelProperties import treeModel | |||
|
17 | 19 | from viewer.ui_unitprocess import Ui_UnitProcess |
|
18 | 20 | from viewer.ui_window import Ui_window |
|
19 | 21 | from viewer.ui_mainwindow import Ui_BasicWindow |
|
20 | from controller import Project,ReadUnitConf,ProcUnitConf,OperationConf,ParameterConf | |
|
22 | ||
|
23 | print "Nohayproblema" | |
|
24 | pathe = os.path.split(os.getcwd())[0] | |
|
25 | sys.path.append(pathe) | |
|
26 | print "leer", pathe | |
|
27 | ||
|
28 | from controller import * | |
|
29 | ||
|
30 | ||
|
31 | #from controller import Project,ReadUnitConf,ProcUnitConf,OperationConf,ParameterConf | |
|
21 | 32 | |
|
22 | 33 | |
|
23 | 34 | def isRadarFile(file): |
@@ -62,6 +73,7 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||
|
62 | 73 | self.__upObjDict = {} |
|
63 | 74 | self.__opObjDict= {} |
|
64 | 75 | self.indexclick=None |
|
76 | self.b=0 | |
|
65 | 77 | |
|
66 | 78 | self.online=0 |
|
67 | 79 | self.datatype=0 |
@@ -113,7 +125,7 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||
|
113 | 125 | self.treeView.setContextMenuPolicy(QtCore.Qt.CustomContextMenu) |
|
114 | 126 | self.treeView.customContextMenuRequested.connect(self.popup) |
|
115 | 127 | #self.treeView.clicked.connect(self.treefunction1) |
|
116 | ||
|
128 | self.model_2=treeModel() | |
|
117 | 129 | |
|
118 | 130 | |
|
119 | 131 | #-----------------------------------BARRA DE MENU-------------------------------------------------# |
@@ -189,6 +201,19 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||
|
189 | 201 | METODO EJECUTADO CUANDO OCURRE EL EVENTO RUN |
|
190 | 202 | Llama al metodo RUN. |
|
191 | 203 | """ |
|
204 | ||
|
205 | print "Leyendo el archivo XML" | |
|
206 | for i in self.__arbolDict: | |
|
207 | if self.__arbolDict[i]==self.indexclick: | |
|
208 | self.projectObj=self.__projObjDict[i] | |
|
209 | print "Encontre project" | |
|
210 | filename="C:\WorkspaceGUI\config"+str(self.projectObj.id)+".xml" | |
|
211 | self.projectObj.readXml(filename) | |
|
212 | #controllerObj.printattr() | |
|
213 | ||
|
214 | self.projectObj.createObjects() | |
|
215 | self.projectObj.connectObjects() | |
|
216 | self.projectObj.run() | |
|
192 | 217 | print "Not implemented yet" |
|
193 | 218 | |
|
194 | 219 | @pyqtSignature("") |
@@ -226,14 +251,7 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||
|
226 | 251 | """ |
|
227 | 252 | print "Not implemented yet" |
|
228 | 253 | |
|
229 | @pyqtSignature("") | |
|
230 | def on_menuHELPPrfObj_clicked(self): | |
|
231 | """ | |
|
232 | METODO EJECUTADO CUANDO OCURRE EL EVENTO HElp | |
|
233 | Llama al metodo close. | |
|
234 | """ | |
|
235 | print "Not implemented yet" | |
|
236 | ||
|
254 | ||
|
237 | 255 | #-----------------------------------BARRA DE HERRAMIENTAS----------------------------------------# |
|
238 | 256 | |
|
239 | 257 | @pyqtSignature("") |
@@ -265,6 +283,18 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||
|
265 | 283 | METODO EJECUTADO CUANDO OCURRE EL EVENTO PAUSA |
|
266 | 284 | Llama al metodo PAUSA. |
|
267 | 285 | """ |
|
286 | print "Leyendo el archivo XML" | |
|
287 | for i in self.__arbolDict: | |
|
288 | if self.__arbolDict[i]==self.indexclick: | |
|
289 | self.projectObj=self.__projObjDict[i] | |
|
290 | print "Encontre project" | |
|
291 | filename="C:\WorkspaceGUI\config"+str(self.projectObj.id)+".xml" | |
|
292 | self.projectObj.readXml(filename) | |
|
293 | #controllerObj.printattr() | |
|
294 | ||
|
295 | self.projectObj.createObjects() | |
|
296 | self.projectObj.connectObjects() | |
|
297 | self.projectObj.run() | |
|
268 | 298 | print "Not implemented yet" |
|
269 | 299 | |
|
270 | 300 | @pyqtSignature("") |
@@ -287,7 +317,7 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||
|
287 | 317 | self.setProjectParam() |
|
288 | 318 | |
|
289 | 319 | #------------------------------------VENTANA CONFIGURACION PROJECT----------------------------# |
|
290 |
|
|
|
320 | ||
|
291 | 321 | @pyqtSignature("int") |
|
292 | 322 | def on_dataTypeCmbBox_activated(self,index): |
|
293 | 323 | """ |
@@ -396,7 +426,7 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||
|
396 | 426 | reloj1=self.startTimeEdit.time() |
|
397 | 427 | |
|
398 | 428 | |
|
399 |
reloj2=self. |
|
|
429 | reloj2=self.endTimeEdit.time() | |
|
400 | 430 | |
|
401 | 431 | print reloj1.hour() |
|
402 | 432 | print reloj1.minute() |
@@ -414,7 +444,8 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||
|
414 | 444 | self.readUnitConfObjList.append(self.readUnitConfObj) |
|
415 | 445 | |
|
416 | 446 | #--------VISUALIZACION EN LA VENTANA PROJECT PROPERTIES-----------------# |
|
417 | self.model_2=treeModel() | |
|
447 | #self.model_2=treeModel() | |
|
448 | self.model_2=treeModel() | |
|
418 | 449 | self.model_2.setParams(name = self.projectObj.name, |
|
419 | 450 | directorio = path, |
|
420 | 451 | workspace = "C:\\WorkspaceGUI", |
@@ -427,6 +458,7 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||
|
427 | 458 | Summary = "test de prueba") |
|
428 | 459 | |
|
429 | 460 | self.model_2.arbol() |
|
461 | self.model_2.showtree() | |
|
430 | 462 | self.treeView_2.setModel(self.model_2) |
|
431 | 463 | self.treeView_2.expandAll() |
|
432 | 464 | |
@@ -458,17 +490,39 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||
|
458 | 490 | self.tabVoltage.setEnabled(False) |
|
459 | 491 | self.tabSpectra.setEnabled(False) |
|
460 | 492 | self.tabCorrelation.setEnabled(False) |
|
461 | self.dataPathTxt.setText('C:\data') | |
|
493 | self.dataPathTxt.setText('C:\data2') | |
|
462 | 494 | self.nameProjectTxt.setText("Test") |
|
463 | 495 | self.numberChannelopVol.setEnabled(False) |
|
496 | self.lineFilteropVolCEB.setEnabled(False) | |
|
464 | 497 | self.lineHeighProfileTxtopVol.setEnabled(False) |
|
465 | 498 | self.numberIntegration.setEnabled(False) |
|
466 | 499 | self.valuenFFTPointOpSpec.setEnabled(False) |
|
467 | 500 | self.lineProfileSelecopVolCEB.setEnabled(False) |
|
468 | ||
|
501 | self.valueSelecChOpVol.setEnabled(False) | |
|
502 | self.valueSelecHeigOpVol.setEnabled(False) | |
|
503 | self.profileSelecOpVol.setEnabled(False) | |
|
504 | self.decodeCcob.setEnabled(False) | |
|
505 | self.decodeMcob.setEnabled(False) | |
|
506 | ||
|
507 | self.wiWineTxtGraphicsVol.setEnabled(False) | |
|
508 | self.channelLisstTxtVol.setEnabled(False) | |
|
509 | self.xminTxtVol.setEnabled(False) | |
|
510 | self.yminTxtVol.setEnabled(False) | |
|
511 | ||
|
512 | self.setDisableAllSpecop() | |
|
513 | self.setDisableAllElementSpecGraph() | |
|
514 | # self.winTitleGraphSpec.setEnabled(False) | |
|
515 | # self.channelListgraphSpec.setEnabled(False) | |
|
516 | # self.xminGraphSpec.setEnabled(False) | |
|
517 | # self.yminGraphSpec.setEnabled(False) | |
|
518 | # self.zminGraphSpec.setEnabled(False) | |
|
519 | # self.timeRangeGraphSpec.setEnabled(False) | |
|
520 | # self.dataPathTxtSpec.setEnabled(False) | |
|
521 | # self.dataPrefixGraphSpec.setEnabled(False) | |
|
522 | ||
|
469 | 523 | def setProjectParam(self): |
|
470 | 524 | self.nameProjectTxt.setText("Test") |
|
471 | self.dataPathTxt.setText('C:\data') | |
|
525 | self.dataPathTxt.setText('C:\data2') | |
|
472 | 526 | self.dataTypeCmbBox.clear() |
|
473 | 527 | self.dataTypeCmbBox.addItem("Voltage") |
|
474 | 528 | self.dataTypeCmbBox.addItem("Spectra") |
@@ -481,7 +535,7 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||
|
481 | 535 | self.time.setHMS(int(starlist[0]),int(starlist[1]),int(starlist[2])) |
|
482 | 536 | self.startTimeEdit.setTime(self.time) |
|
483 | 537 | self.time.setHMS(int(endlist[0]),int(endlist[1]),int(endlist[2])) |
|
484 |
self. |
|
|
538 | self.endTimeEdit.setTime(self.time) | |
|
485 | 539 | |
|
486 | 540 | def clickFunctiontree(self,index): |
|
487 | 541 | |
@@ -518,24 +572,25 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||
|
518 | 572 | self.time.setHMS(int(starlist[0]),int(starlist[1]),int(starlist[2])) |
|
519 | 573 | self.startTimeEdit.setTime(self.time) |
|
520 | 574 | self.time.setHMS(int(endlist[0]),int(endlist[1]),int(endlist[2])) |
|
521 |
self. |
|
|
575 | self.endTimeEdit.setTime(self.time) | |
|
522 | 576 | |
|
523 | 577 | #--------VISUALIZACION EN LA VENTANA PROJECT PROPERTIES-----------------# |
|
524 | self.model_2=treeModel() | |
|
525 | self.model_2.setParams(name = str(self.__projObjDict[i].name), | |
|
526 | directorio = str(self.readUnitConfObjList[i-1].path), | |
|
527 | workspace = "C:\\WorkspaceGUI", | |
|
528 | remode = str(self.readModeCmBox.currentText()), | |
|
529 | dataformat = "Voltage", | |
|
530 | date = str(self.readUnitConfObjList[i-1].startDate)+"-"+str(self.readUnitConfObjList[i-1].endDate), | |
|
531 | initTime = str(starlist[0]) +":"+str(starlist[1])+":"+ str(starlist[2]), | |
|
532 | endTime = str(endlist[0]) +":"+str(endlist[1])+":"+ str(endlist[2]), | |
|
533 | timezone = "Local" , | |
|
534 | Summary = "test de prueba") | |
|
535 | ||
|
536 | self.model_2.arbol() | |
|
537 |
self. |
|
|
538 |
self.treeView_2. |
|
|
578 | # self.model_2=treeModel() | |
|
579 | # self.model_2.setParams(name = str(self.__projObjDict[i].name), | |
|
580 | # directorio = str(self.readUnitConfObjList[i-1].path), | |
|
581 | # workspace = "C:\\WorkspaceGUI", | |
|
582 | # remode = str(self.readModeCmBox.currentText()), | |
|
583 | # dataformat = "Voltage", | |
|
584 | # date = str(self.readUnitConfObjList[i-1].startDate)+"-"+str(self.readUnitConfObjList[i-1].endDate), | |
|
585 | # initTime = str(starlist[0]) +":"+str(starlist[1])+":"+ str(starlist[2]), | |
|
586 | # endTime = str(endlist[0]) +":"+str(endlist[1])+":"+ str(endlist[2]), | |
|
587 | # timezone = "Local" , | |
|
588 | # Summary = "test de prueba") | |
|
589 | # | |
|
590 | # self.model_2.arbol() | |
|
591 | # self.model_2.showtree() | |
|
592 | # self.treeView_2.setModel(self.model_2) | |
|
593 | # self.treeView_2.expandAll() | |
|
539 | 594 | |
|
540 | 595 | #self.dataPathTxt.setText(str(self.__projObjDict[i].addReadUnit.path())) |
|
541 | 596 | |
@@ -548,6 +603,7 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||
|
548 | 603 | if self.indexclick.text()=='Spectra': |
|
549 | 604 | self.tabSpectra.setEnabled(True) |
|
550 | 605 | self.tabWidgetProject.setCurrentWidget(self.tabSpectra) |
|
606 | ||
|
551 | 607 | |
|
552 | 608 | if self.indexclick.text()=='Correlation': |
|
553 | 609 | self.tabCorrelation.setEnabled(True) |
@@ -684,7 +740,7 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||
|
684 | 740 | self.time.setHMS(self.hour, self.min, self.sec) |
|
685 | 741 | self.startTimeEdit.setTime(self.time) |
|
686 | 742 | |
|
687 |
self. |
|
|
743 | self.endTimeEdit.setTime(self.time) | |
|
688 | 744 | |
|
689 | 745 | |
|
690 | 746 | def addUP(self): |
@@ -772,12 +828,14 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||
|
772 | 828 | self.selecHeighopVolCEB.setChecked(False) |
|
773 | 829 | self.coherentIntegrationCEB.setChecked(False) |
|
774 | 830 | self.profileSelecopVolCEB.setChecked(False) |
|
831 | self.FilterCEB.setChecked(False) | |
|
832 | ||
|
775 | 833 | #self.selecChannelopVolCEB.setEnabled(False) |
|
776 | 834 | self.lineHeighProfileTxtopVol.clear() |
|
777 | 835 | self.lineProfileSelecopVolCEB.clear() |
|
778 | 836 | self.numberChannelopVol.clear() |
|
779 | 837 | self.numberIntegration.clear() |
|
780 | ||
|
838 | self.lineFilteropVolCEB.clear() | |
|
781 | 839 | |
|
782 | 840 | def resetopSpec(self): |
|
783 | 841 | |
@@ -800,10 +858,22 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||
|
800 | 858 | print "Escribo Project" |
|
801 | 859 | self.projectObj.writeXml(filename) |
|
802 | 860 | |
|
861 | # -----------------OPCIONES DE CONFIGURACION VOLTAGE---------------------------# | |
|
803 | 862 | |
|
863 | @pyqtSignature("") | |
|
864 | def on_dataGraphicsVolPathBrowse_clicked(self): | |
|
865 | """ | |
|
866 | OBTENCION DE LA RUTA DE DATOS | |
|
867 | """ | |
|
868 | self.dataPath = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)) | |
|
869 | self.dataPathtxtGraphicsVol.setText(self.dataPath) | |
|
870 | ||
|
871 | if not os.path.exists(self.dataPath): | |
|
872 | self.dataGraphVolOkBtn.setEnabled(False) | |
|
873 | return | |
|
804 | 874 | |
|
805 | 875 | # -----------------VENTANA CONFIGURACION DE VOLTAGE---------------------------# |
|
806 | ||
|
876 | ||
|
807 | 877 | @pyqtSignature("int") |
|
808 | 878 | def on_selecChannelopVolCEB_stateChanged(self, p0): |
|
809 | 879 | """ |
@@ -811,14 +881,11 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||
|
811 | 881 | """ |
|
812 | 882 | if p0==2: |
|
813 | 883 | self.numberChannelopVol.setEnabled(True) |
|
814 | # upProcessSelect=self.upObjVolList[int(self.addOpUpselec.currentIndex())] | |
|
815 | # opObj10=upProcessSelect.addOperation(name='selectChannels') | |
|
816 | # print opObj10.id | |
|
817 | # self.operObjList.append(opObj10) | |
|
884 | self.valueSelecChOpVol.setEnabled(True) | |
|
818 | 885 | print " Ingresa seleccion de Canales" |
|
819 | 886 | if p0==0: |
|
820 | 887 | self.numberChannelopVol.setEnabled(False) |
|
821 | ||
|
888 | self.valueSelecChOpVol.setEnabled(False) | |
|
822 | 889 | print " deshabilitado" |
|
823 | 890 | |
|
824 | 891 | @pyqtSignature("int") |
@@ -828,33 +895,55 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||
|
828 | 895 | """ |
|
829 | 896 | if p0==2: |
|
830 | 897 | self.lineHeighProfileTxtopVol.setEnabled(True) |
|
831 | # upProcessSelect=self.upObjVolList[int(self.addOpUpselec.currentIndex())] | |
|
832 | # opObj10=upProcessSelect.addOperation(name='selectHeights') | |
|
833 | # print opObj10.id | |
|
834 | # self.operObjList.append(opObj10) | |
|
898 | self.valueSelecHeigOpVol.setEnabled(True) | |
|
835 | 899 | print " Select Type of Profile" |
|
836 | 900 | if p0==0: |
|
837 | 901 | self.lineHeighProfileTxtopVol.setEnabled(False) |
|
902 | self.valueSelecHeigOpVol.setEnabled(False) | |
|
838 | 903 | print " deshabilitado" |
|
839 | 904 | |
|
840 | 905 | |
|
841 | 906 | @pyqtSignature("int") |
|
907 | def on_filterCEB_stateChanged(self, p0): | |
|
908 | """ | |
|
909 | Name='Decoder', optype='other' | |
|
910 | """ | |
|
911 | if p0==2: | |
|
912 | self.lineFilteropVolCEB.setEnabled(True) | |
|
913 | print " Select Type of Profile" | |
|
914 | if p0==0: | |
|
915 | self.lineFilteropVolCEB.setEnabled(False) | |
|
916 | print " deshabilitado" | |
|
917 | ||
|
918 | @pyqtSignature("int") | |
|
842 | 919 | def on_profileSelecopVolCEB_stateChanged(self, p0): |
|
843 | 920 | """ |
|
844 | 921 | Check Box habilita ingreso del rango de Perfiles |
|
845 | 922 | """ |
|
846 | 923 | if p0==2: |
|
847 | 924 | self.lineProfileSelecopVolCEB.setEnabled(True) |
|
848 | # upProcessSelect=self.upObjVolList[int(self.addOpUpselec.currentIndex())] | |
|
849 | # opObj10=upProcessSelect.addOperation(name='ProfileSelector', optype='other') | |
|
850 | # print opObj10.id | |
|
851 | # self.operObjList.append(opObj10) | |
|
925 | self.profileSelecOpVol.setEnabled(True) | |
|
852 | 926 | print " Select Type of Profile" |
|
853 | 927 | if p0==0: |
|
854 | 928 | self.lineProfileSelecopVolCEB.setEnabled(False) |
|
855 | ||
|
929 | self.profileSelecOpVol.setEnabled(False) | |
|
856 | 930 | print " deshabilitado" |
|
857 | ||
|
931 | ||
|
932 | ||
|
933 | @pyqtSignature("int") | |
|
934 | def on_decodeCEB_stateChanged(self, p0): | |
|
935 | """ | |
|
936 | Check Box habilita ingresode del numero de Integraciones a realizar | |
|
937 | """ | |
|
938 | if p0==2: | |
|
939 | self.decodeCcob.setEnabled(True) | |
|
940 | self.decodeMcob.setEnabled(True) | |
|
941 | print "Choose number of Cohint" | |
|
942 | if p0==0: | |
|
943 | print " deshabilitado" | |
|
944 | self.decodeCcob.setEnabled(False) | |
|
945 | self.decodeMcob.setEnabled(False) | |
|
946 | ||
|
858 | 947 | |
|
859 | 948 | @pyqtSignature("int") |
|
860 | 949 | def on_coherentIntegrationCEB_stateChanged(self, p0): |
@@ -863,16 +952,12 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||
|
863 | 952 | """ |
|
864 | 953 | if p0==2: |
|
865 | 954 | self.numberIntegration.setEnabled(True) |
|
866 | # upProcessSelect=self.upObjVolList[int(self.addOpUpselec.currentIndex())] | |
|
867 | # opObj10=upProcessSelect.addOperation(name='CohInt', optype='other') | |
|
868 | # print opObj10.id | |
|
869 | # self.operObjList.append(opObj10) | |
|
870 | 955 | print "Choose number of Cohint" |
|
871 | 956 | if p0==0: |
|
872 | 957 | print " deshabilitado" |
|
873 | 958 | self.numberIntegration.setEnabled(False) |
|
874 | 959 | |
|
875 | #-----------------------PUSHBUTTON_ACCEPT_OPERATION----------------------------# | |
|
960 | #-----------------------VOL_PUSHBUTTON_ACCEPT_OPERATION----------------------------# | |
|
876 | 961 | |
|
877 | 962 | @pyqtSignature("") |
|
878 | 963 | def on_dataopVolOkBtn_clicked(self): |
@@ -885,48 +970,165 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||
|
885 | 970 | print "INDEXCLICK=ARBOLDICT",i |
|
886 | 971 | if self.__upObjDict.has_key(i)==True: |
|
887 | 972 | self.upObj=self.__upObjDict[i] |
|
888 | # self.operObjList.append(opObj10) | |
|
889 | ||
|
973 | print self.__upObjDict[i].name | |
|
974 | print "TamaΓ±odeupObjDict",len(self.__upObjDict) | |
|
975 | # if len(self.__upObjDict)>=1 and len(self.__upObjDict)> self.b: | |
|
976 | ||
|
890 | 977 | if self.selecChannelopVolCEB.isChecked(): |
|
891 | opObj10=self.upObj.addOperation(name='selectChannels') | |
|
892 | self.operObjList.append(opObj10) | |
|
893 | value=self.numberChannelopVol.text() | |
|
894 | opObj10.addParameter(name='channelList', value=value, format='intlist') | |
|
895 | ||
|
896 | ||
|
897 | print "channel" | |
|
898 | ||
|
899 | if self.selecHeighopVolCEB.isChecked(): | |
|
900 | opObj10=self.upObj.addOperation(name='selectHeights') | |
|
901 |
print |
|
|
902 | self.operObjList.append(opObj10) | |
|
903 | value=self.lineHeighProfileTxtopVol.text() | |
|
904 | valueList=value.split(',') | |
|
905 | opObj10.addParameter(name='minHei', value=valueList[0], format='float') | |
|
906 | opObj10.addParameter(name='maxHei', value=valueList[1], format='float') | |
|
907 | ||
|
908 | print "height" | |
|
909 | ||
|
910 | ||
|
978 | if self.valueSelecChOpVol.currentIndex()== 0: | |
|
979 | opObj10=self.upObj.addOperation(name="selectChannels") | |
|
980 | self.operObjList.append(opObj10) | |
|
981 | value=self.numberChannelopVol.text() | |
|
982 | opObj10.addParameter(name='channelList', value=value, format='intlist') | |
|
983 | else: | |
|
984 | opObj10=self.upObj.addOperation(name="selectChannelsByIndex") | |
|
985 | self.operObjList.append(opObj10) | |
|
986 | value=self.numberChannelopVol.text() | |
|
987 | opObj10.addParameter(name='channelIndexList', value=value, format='intlist') | |
|
988 | print "channel" | |
|
989 | ||
|
911 | 990 | if self.selecHeighopVolCEB.isChecked(): |
|
912 | obj10=self.upObj.addOperation(name='ProfileSelector', optype='other') | |
|
913 | print opObj10.id | |
|
914 | self.operObjList.append(opObj10) | |
|
915 | value=self.lineProfileSelecopVolCEB.text() | |
|
916 |
obj10.addParameter(name=' |
|
|
917 | ||
|
918 |
|
|
|
919 | # if i.name=='ProfileSelector' : | |
|
920 |
|
|
|
921 | # i.addParameter(name='ProfileSelector', value=value, format='intlist') | |
|
991 | if self.valueSelecHeigOpVol.currentIndex()== 0: | |
|
992 | opObj10=self.upObj.addOperation(name='selectHeights') | |
|
993 | value=self.lineHeighProfileTxtopVol.text() | |
|
994 | valueList=value.split(',') | |
|
995 | opObj10.addParameter(name='minHei', value=valueList[0], format='float') | |
|
996 | opObj10.addParameter(name='maxHei', value=valueList[1], format='float') | |
|
997 | else: | |
|
998 | opObj10=self.upObj.addOperation(name='selectHeightsByIndex') | |
|
999 | value=self.lineHeighProfileTxtopVol.text() | |
|
1000 | valueList=value.split(',') | |
|
1001 | opObj10.addParameter(name='minIndex', value=valueList[0], format='float') | |
|
1002 | opObj10.addParameter(name='maxIndex', value=valueList[1], format='float') | |
|
1003 | ||
|
1004 | print "height" | |
|
1005 | ||
|
1006 | if self.filterCEB.isChecked(): | |
|
1007 | opObj10=self.upObj.addOperation(name='filterByHeights') | |
|
1008 | value=self.lineFilteropVolCEB.text() | |
|
1009 | opObj10.addParameter(name='window', value=value, format='int') | |
|
1010 | print "filter" | |
|
1011 | ||
|
1012 | if self.profileSelecopVolCEB.isChecked(): | |
|
1013 | obj10=self.upObj.addOperation(name='ProfileSelector', optype='other') | |
|
1014 | if self.profileSelecOpVol.currentIndex()== 0: | |
|
1015 | self.operObjList.append(opObj10) | |
|
1016 | value=self.lineProfileSelecopVolCEB.text() | |
|
1017 | obj10.addParameter(name='profileList', value=value, format='intlist') | |
|
1018 | else: | |
|
1019 | self.operObjList.append(opObj10) | |
|
1020 | value=self.lineProfileSelecopVolCEB.text() | |
|
1021 | obj10.addParameter(name='profileRangeList', value=value, format='intlist') | |
|
1022 | print "profile" | |
|
1023 | ||
|
1024 | if self.decodeCEB.isChecked(): | |
|
1025 | opObj10=self.upObj.addOperation(name='Decoder') | |
|
1026 | if self.decodeCcob.currentIndex()==0: | |
|
1027 | opObj10.addParameter(name='code', value='1,1,-1,-1,-1,1', format='floatlist') | |
|
1028 | opObj10.addParameter(name='nCode', value='2', format='int') | |
|
1029 | opObj10.addParameter(name='nBaud', value='3', format='int') | |
|
1030 | if self.decodeCcob.currentIndex()==1: | |
|
1031 | opObj10.addParameter(name='code', value='1,1,β1,1,-1,-1,1,-1', format='floatlist') | |
|
1032 | opObj10.addParameter(name='nCode', value='2', format='int') | |
|
1033 | opObj10.addParameter(name='nBaud', value='4', format='int') | |
|
1034 | if self.decodeCcob.currentIndex()==2: | |
|
1035 | opObj10.addParameter(name='code', value='1,1,1,β1,1,-1,-1,-1,1,-1', format='floatlist') | |
|
1036 | opObj10.addParameter(name='nCode', value='2', format='int') | |
|
1037 | opObj10.addParameter(name='nBaud', value='5', format='int') | |
|
1038 | if self.decodeCcob.currentIndex()==3: | |
|
1039 | opObj10.addParameter(name='code', value='1,1,1,β1,β1,1,β1,-1,-1,-1,1,1,-1,1', format='floatlist') | |
|
1040 | opObj10.addParameter(name='nCode', value='2', format='int') | |
|
1041 | opObj10.addParameter(name='nBaud', value='7', format='int') | |
|
1042 | if self.decodeCcob.currentIndex()==4: | |
|
1043 | opObj10.addParameter(name='code', value='1,1,1,β1,β1,β1,1,β1,β1,1,β1,-1 ,-1 ,-1 ,1 ,1 ,1 ,-1 ,1 ,1 ,-1 ,1', format='floatlist') | |
|
1044 | opObj10.addParameter(name='nCode', value='2', format='int') | |
|
1045 | opObj10.addParameter(name='nBaud', value='11', format='int') | |
|
1046 | if self.decodeCcob.currentIndex()==5: | |
|
1047 | opObj10.addParameter(name='code', value='1,1,1,1,1,β1,β1,1,1,β1,1,β1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1', format='floatlist') | |
|
1048 | opObj10.addParameter(name='nCode', value='2', format='int') | |
|
1049 | opObj10.addParameter(name='nBaud', value='13', format='int') | |
|
922 | 1050 | |
|
1051 | if self.decodeMcob.currentIndex()==0: | |
|
1052 | opObj10.addParameter(name='mode', value='0', format='int') | |
|
1053 | ||
|
1054 | if self.decodeMcob.currentIndex()==1: | |
|
1055 | opObj10.addParameter(name='mode', value='1', format='int') | |
|
1056 | ||
|
1057 | if self.decodeMcob.currentIndex()==2: | |
|
1058 | opObj10.addParameter(name='mode', value='2', format='int') | |
|
1059 | ||
|
923 | 1060 | if self.coherentIntegrationCEB.isChecked(): |
|
924 | opObj10=self.upObj.addOperation(name='CohInt', optype='other') | |
|
925 | print opObj10.id | |
|
1061 | opObj10=self.upObj.addOperation(name='CohInt', optype='other') | |
|
1062 | print opObj10.id | |
|
1063 | self.operObjList.append(opObj10) | |
|
1064 | value=self.numberIntegration.text() | |
|
1065 | opObj10.addParameter(name='n', value=value, format='int') | |
|
1066 | print "Coherent" | |
|
1067 | ||
|
1068 | ||
|
1069 | # print "TamaΓ±odeupObjDict",len(self.__upObjDict) | |
|
1070 | # self.b=len(self.__upObjDict) | |
|
1071 | # print "self.b", self.b | |
|
1072 | # self.model_2.properties_projecto("estaesunaprueba") | |
|
1073 | # anadir=self.model_2.properties_projecto("estaesunaprueba") | |
|
1074 | # self.model_2.addProjectproperties(anadir) | |
|
1075 | # self.model_2.showtree() | |
|
1076 | # self.treeView_2.setModel(self.model_2) | |
|
1077 | # self.treeView_2.expandAll() | |
|
1078 | # else: | |
|
1079 | # print"It doesn't works" | |
|
1080 | ||
|
1081 | # self.o | |
|
1082 | ||
|
1083 | ||
|
1084 | # -----------------VENTANA CONFIGURACION GRAPH VOLTAGE---------------------------# | |
|
1085 | ||
|
1086 | @pyqtSignature("int") | |
|
1087 | def on_dataTypeSelecVol_activated(self,index): | |
|
1088 | """ | |
|
1089 | Metodo que identifica que tipo de dato se va a trabajar VOLTAGE O ESPECTRA | |
|
1090 | """ | |
|
1091 | ||
|
1092 | if index==0: | |
|
1093 | self.wiWineTxtGraphicsVol.setEnabled(True) | |
|
1094 | self.channelLisstTxtVol.setEnabled(True) | |
|
1095 | self.xminTxtVol.setEnabled(True) | |
|
1096 | self.yminTxtVol.setEnabled(True) | |
|
1097 | ||
|
1098 | @pyqtSignature(" ") | |
|
1099 | def on_dataGraphVolOkBtn_clicked(self): | |
|
1100 | """ | |
|
1101 | GRAPH | |
|
1102 | """ | |
|
1103 | for i in self.__arbolDict: | |
|
1104 | if self.__arbolDict[i]==self.indexclick: | |
|
1105 | print "INDEXCLICK=ARBOLDICT",i | |
|
1106 | if self.__upObjDict.has_key(i)==True: | |
|
1107 | self.upObj=self.__upObjDict[i] | |
|
1108 | print self.__upObjDict[i].name | |
|
1109 | ||
|
1110 | if self.valueSelecChOpVol.currentIndex()==0: | |
|
1111 | opObj10=self.upObj.addOperation(name='Scope', optype='other') | |
|
926 | 1112 | self.operObjList.append(opObj10) |
|
927 |
|
|
|
928 | opObj10.addParameter(name='n', value=value, format='int') | |
|
929 | # self.__opObjDict[i]==self.operObjList | |
|
1113 | wintitle=self.wiWineTxtGraphicsVol.text() | |
|
1114 | channelList=self.channelLisstTxtVol.text() | |
|
1115 | xvalue= self.xminTxtVol.text() | |
|
1116 | yvalue= self.yminTxtVol.text() | |
|
1117 | ||
|
1118 | opObj10.addParameter(name='wintitle', value=wintitle, format='str') | |
|
1119 | opObj10.addParameter(name='channelList', value=channelList, format='int') | |
|
1120 | xvalueList=xvalue.split(',') | |
|
1121 | opObj10.addParameter(name='xmin', value=xvalueList[0], format='int') | |
|
1122 | opObj10.addParameter(name='xmax', value=xvalueList[1], format='int') | |
|
1123 | yvalueList=yvalue.split(",") | |
|
1124 | opObj10.addParameter(name='ymin', value=yvalueList[0], format='int') | |
|
1125 | opObj10.addParameter(name='ymax', value=yvalueList[1], format='int') | |
|
1126 | ||
|
1127 | if self.savedataCEBGraphicsVol.isChecked(): | |
|
1128 | opObj10.addParameter(name='save', value='1', format='int') | |
|
1129 | opObj10.addParameter(name='figpath', value= self.dataPathtxtGraphicsVol.text()) | |
|
1130 | opObj10.addParameter(name='figfile', value= self.dataPrefixtxtGraphicsVol.text()) | |
|
1131 | ||
|
930 | 1132 | |
|
931 | 1133 | |
|
932 | 1134 | #-------------------------VENTANA DE CONFIGURACION SPECTRA------------------------# |
@@ -943,111 +1145,286 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||
|
943 | 1145 | print " deshabilitado" |
|
944 | 1146 | self.valuenFFTPointOpSpec.setEnabled(False) |
|
945 | 1147 | |
|
1148 | @pyqtSignature("int") | |
|
1149 | def on_SelectHeiopSpecCEB_stateChanged(self, p0): | |
|
1150 | """ | |
|
1151 | Habilita la opcion de aοΏ½adir el parοΏ½metro nFFTPoints a la Unidad de Procesamiento . | |
|
1152 | """ | |
|
1153 | if p0==2: | |
|
1154 | self.valueSelecChOpHei.setEnabled(True) | |
|
1155 | self.selecHeiopSpec.setEnabled(True) | |
|
1156 | print "selectHeights" | |
|
1157 | if p0==0: | |
|
1158 | print " deshabilitado" | |
|
1159 | self.valueSelecChOpHei.setEnabled(False) | |
|
1160 | self.selecHeiopSpec.setEnabled(False) | |
|
1161 | ||
|
1162 | @pyqtSignature("int") | |
|
1163 | def on_selecChannelopSpecCEB_stateChanged(self, p0): | |
|
1164 | """ | |
|
1165 | Habilita la opcion de aοΏ½adir el parοΏ½metro nFFTPoints a la Unidad de Procesamiento . | |
|
1166 | """ | |
|
1167 | if p0==2: | |
|
1168 | self.valueSelecChOpSpec.setEnabled(True) | |
|
1169 | self.numberChannelopSpec.setEnabled(True) | |
|
1170 | print "selectChannel" | |
|
1171 | if p0==0: | |
|
1172 | print " deshabilitado" | |
|
1173 | self.valueSelecChOpSpec.setEnabled(False) | |
|
1174 | self.numberChannelopSpec.setEnabled(False) | |
|
1175 | ||
|
1176 | @pyqtSignature("int") | |
|
1177 | def on_IncohIntOpSpecCEB_stateChanged(self, p0): | |
|
1178 | """ | |
|
1179 | Habilita la opcion de aοΏ½adir el parοΏ½metro nFFTPoints a la Unidad de Procesamiento . | |
|
1180 | """ | |
|
1181 | if p0==2: | |
|
1182 | self.valueIncohIntOpSpec.setEnabled(True) | |
|
1183 | ||
|
1184 | print "selectIncohInt" | |
|
1185 | if p0==0: | |
|
1186 | print " deshabilitado" | |
|
1187 | self.valueIncohIntOpSpec.setEnabled(False) | |
|
1188 | ||
|
1189 | @pyqtSignature("int") | |
|
1190 | def on_removedcOpSpecCEB_stateChanged(self, p0): | |
|
1191 | """ | |
|
1192 | Habilita la opcion de aοΏ½adir el parοΏ½metro nFFTPoints a la Unidad de Procesamiento . | |
|
1193 | """ | |
|
1194 | if p0==2: | |
|
1195 | self.valueremoveDCOpSpec.setEnabled(True) | |
|
1196 | ||
|
1197 | print "removedcOpSpecCEB" | |
|
1198 | if p0==0: | |
|
1199 | print " deshabilitado" | |
|
1200 | self.valueremoveDCOpSpec.setEnabled(False) | |
|
1201 | ||
|
1202 | ||
|
1203 | def setDisableAllSpecop(self): | |
|
1204 | self.valuenFFTPointOpSpec.setEnabled(False) | |
|
1205 | self.valueSelecChOpHei.setEnabled(False) | |
|
1206 | self.selecHeiopSpec.setEnabled(False) | |
|
1207 | self.numberChannelopSpec.setEnabled(False) | |
|
1208 | self.valueSelecChOpSpec.setEnabled(False) | |
|
1209 | self.valueIncohIntOpSpec.setEnabled(False) | |
|
1210 | self.valueremoveDCOpSpec.setEnabled(False) | |
|
1211 | #-----------------------SPEC_PUSHBUTTON_ACCEPT_OPERATION----------------------------# | |
|
1212 | ||
|
1213 | ||
|
946 | 1214 | |
|
947 | 1215 | |
|
948 | 1216 | @pyqtSignature("") |
|
949 | 1217 | def on_dataopSpecOkBtn_clicked(self): |
|
950 | 1218 | """ |
|
951 | AοΏ½ade al archivo de configuraciοΏ½n el parοΏ½metros nFFTPoints a la UP. | |
|
1219 | AΓADE OPERACION SPECTRA | |
|
952 | 1220 | """ |
|
953 | print "AοΏ½adimos operaciones Spectra,nchannels,value,format" | |
|
954 | ||
|
1221 | print "AΓADEOPERACIONSPECTRA" | |
|
955 | 1222 | for i in self.__arbolDict: |
|
956 | 1223 | if self.__arbolDict[i]==self.indexclick: |
|
957 | 1224 | print "INDEXCLICK=ARBOLDICT",i |
|
958 | 1225 | if self.__upObjDict.has_key(i)==True: |
|
959 | 1226 | self.upObj=self.__upObjDict[i] |
|
1227 | print self.__upObjDict[i].name | |
|
960 | 1228 | # self.operObjList.append(opObj10) |
|
961 | 1229 | |
|
962 | 1230 | if self.nFFTPointOpSpecCEB.isChecked(): |
|
963 |
value=self. |
|
|
1231 | value=self.valuenFFTPointOpSpec.text() | |
|
964 | 1232 | self.upObj.addParameter(name='nFFTPoints',value=value,format='int') |
|
965 | 1233 | print "nFFTpoints" |
|
966 |
|
|
|
967 |
|
|
|
968 | ||
|
969 | #---------------------VENTANA DE CONFIGURACION GRAPH SPECTRA------------------# | |
|
970 | ||
|
971 | @pyqtSignature("int") | |
|
972 | def on_SpectraPlotGraphCEB_stateChanged(self, p0): | |
|
973 | """ | |
|
974 | Habilita la opcion de Ploteo Spectra Plot | |
|
975 | """ | |
|
976 | if p0==2: | |
|
977 | print "Habilitado" | |
|
978 | ||
|
979 | if p0==0: | |
|
980 | print " deshabilitado" | |
|
981 | ||
|
1234 | ||
|
1235 | ||
|
1236 | if self.SelectHeiopSpecCEB.isChecked(): | |
|
1237 | if self.valueSelecChOpHei.currentIndex()== 0: | |
|
1238 | opObj10=self.upObj.addOperation(name='selectHeights') | |
|
1239 | value=self.selecHeiopSpec.text() | |
|
1240 | valueList=value.split(',') | |
|
1241 | opObj10.addParameter(name='minHei', value=valueList[0], format='float') | |
|
1242 | opObj10.addParameter(name='maxHei', value=valueList[1], format='float') | |
|
1243 | else: | |
|
1244 | opObj10=self.upObj.addOperation(name='selectHeightsByIndex') | |
|
1245 | value=self.selecHeiopSpec.text() | |
|
1246 | valueList=value.split(',') | |
|
1247 | opObj10.addParameter(name='minIndex', value=valueList[0], format='float') | |
|
1248 | opObj10.addParameter(name='maxIndex', value=valueList[1], format='float') | |
|
1249 | ||
|
1250 | if self.selecChannelopSpecCEB.isChecked(): | |
|
1251 | if self.valueSelecChOpSpec.currentIndex()== 0: | |
|
1252 | opObj10=self.upObj.addOperation(name="selectChannels") | |
|
1253 | self.operObjList.append(opObj10) | |
|
1254 | value=self.numberChannelopSpec.text() | |
|
1255 | opObj10.addParameter(name='channelList', value=value, format='intlist') | |
|
1256 | else: | |
|
1257 | opObj10=self.upObj.addOperation(name="selectChannelsByIndex") | |
|
1258 | self.operObjList.append(opObj10) | |
|
1259 | value=self.numberChannelopSpec.text() | |
|
1260 | opObj10.addParameter(name='channelIndexList', value=value, format='intlist') | |
|
1261 | print "channel" | |
|
1262 | ||
|
1263 | if self.IncohIntOpSpecCEB.isChecked(): | |
|
1264 | opObj10=self.upObj.addOperation(name='IncohInt', optype='other') | |
|
1265 | self.operObjList.append(opObj10) | |
|
1266 | value=self.valueIncohIntOpSpec.text() | |
|
1267 | opObj10.addParameter(name='n', value=value, format='float') | |
|
1268 | ||
|
1269 | if self.removedcOpSpecCEB.isChecked(): | |
|
1270 | opObj10=self.upObj.addOperation(name='removeDC') | |
|
1271 | value=self.valueremoveDCOpSpec.text() | |
|
1272 | opObj10.addParameter(name='mode', value=value,format='int') | |
|
1273 | ||
|
1274 | ||
|
1275 | #---------------------VENTANA DE CONFIGURACION GRAPH SPECTRA------------------# | |
|
982 | 1276 | @pyqtSignature("int") |
|
983 | def on_CrossSpectraPlotGraphceb_stateChanged(self, p0): | |
|
984 | """ | |
|
985 | Habilita la opciοΏ½n de Ploteo CrossSpectra | |
|
986 | """ | |
|
987 | if p0==2: | |
|
988 | print "Habilitado" | |
|
989 | if p0==0: | |
|
990 | print " deshabilitado" | |
|
1277 | def on_dataTypeSelectorCmb_activated(self,index): | |
|
1278 | self.setClearAllElementGraph() | |
|
1279 | self.setEnableAllElementGraph() | |
|
1280 | if index==0: | |
|
1281 | self.timeRangeGraphSpec.setEnabled(False) | |
|
1282 | if index==1: | |
|
1283 | self.timeRangeGraphSpec.setEnabled(False) | |
|
1284 | if index==2: | |
|
1285 | self.timeRangeGraphSpec.setEnabled(False) | |
|
1286 | if index==3: | |
|
1287 | self.timeRangeGraphSpec.setEnabled(False) | |
|
1288 | ||
|
991 | 1289 | |
|
992 | 1290 | @pyqtSignature("int") |
|
993 |
def on_ |
|
|
1291 | def on_saveGraphSpec_stateChanged(self, p0): | |
|
994 | 1292 | """ |
|
995 | Habilita la opciοΏ½n de Plote RTIPlot | |
|
1293 | Habilita la opcion de aοΏ½adir el parοΏ½metro nFFTPoints a la Unidad de Procesamiento . | |
|
996 | 1294 | """ |
|
997 | 1295 | if p0==2: |
|
998 | print "Habilitado" | |
|
1296 | self.dataPathTxtSpec.setEnabled(True) | |
|
1297 | self.dataPrefixGraphSpec.setEnabled(True) | |
|
1298 | print " nFFTPoint" | |
|
999 | 1299 | if p0==0: |
|
1000 |
print " deshabilitado" |
|
|
1001 | ||
|
1002 | #------------------PUSH_BUTTON_SPECTRA_GRAPH_OK-----------------------------# | |
|
1300 | print " deshabilitado" | |
|
1301 | self.dataPathTxtSpec.setEnabled(False) | |
|
1302 | self.dataPrefixGraphSpec.setEnabled(False) | |
|
1303 | ||
|
1304 | ||
|
1003 | 1305 | @pyqtSignature("") |
|
1004 | 1306 | def on_dataGraphSpecOkBtn_clicked(self): |
|
1005 |
|
|
|
1006 | HABILITAR DE ACUERDO A LOS CHECKBOX QUE TIPO DE PLOTEOS SE VAN A REALIZAR MUESTRA Y GRABA LAS IMAGENES. | |
|
1007 |
|
|
|
1307 | ||
|
1308 | print "AΓADEOPERACIONSPECTRA" | |
|
1309 | ||
|
1008 | 1310 | for i in self.__arbolDict: |
|
1009 | 1311 | if self.__arbolDict[i]==self.indexclick: |
|
1010 | 1312 | print "INDEXCLICK=ARBOLDICT",i |
|
1011 | 1313 | if self.__upObjDict.has_key(i)==True: |
|
1012 | 1314 | self.upObj=self.__upObjDict[i] |
|
1013 |
print |
|
|
1014 | ||
|
1015 | if self.SpectraPlotGraphCEB_2.isChecked(): | |
|
1315 | print self.__upObjDict[i].name | |
|
1316 | ||
|
1317 | if self.dataTypeSelectorCmb.currentIndex()==0: | |
|
1016 | 1318 | opObj10=self.upObj.addOperation(name='SpectraPlot',optype='other') |
|
1017 | print opObj10.id | |
|
1018 |
self. |
|
|
1019 |
|
|
|
1020 | if i.name=='SpectraPlot': | |
|
1021 | i.addParameter(name='idfigure', value='1', format='int') | |
|
1022 | i.addParameter(name='wintitle', value='SpectraPlot0', format='str') | |
|
1023 |
|
|
|
1024 |
|
|
|
1025 |
|
|
|
1026 |
|
|
|
1027 |
if self. |
|
|
1028 |
|
|
|
1029 |
|
|
|
1030 | self.operObjList.append(opObj10) | |
|
1031 | for i in self.operObjList: | |
|
1032 | if i.name=='CrossSpectraPlot' : | |
|
1033 | i.addParameter(name='idfigure', value='2', format='int') | |
|
1034 |
|
|
|
1035 |
|
|
|
1036 | i.addParameter(name='zmax', value='90', format='int') | |
|
1037 | ||
|
1038 | if self.RTIPlotGraphCEB.isChecked(): | |
|
1039 | opObj10=self.upObj.addOperation(name='RTIPlot',optype='other') | |
|
1040 | print opObj10.id | |
|
1041 | self.operObjList.append(opObj10) | |
|
1042 | for i in self.operObjList: | |
|
1043 | if i.name=='RTIPlot': | |
|
1044 | i.addParameter(name='n', value='2', format='int') | |
|
1045 | i.addParameter(name='overlapping', value='1', format='int') | |
|
1046 | ||
|
1319 | opObj10.addParameter(name='idfigure', value='1', format='int') | |
|
1320 | self.properSpecGraph(opObj10) | |
|
1321 | ||
|
1322 | if self.dataTypeSelectorCmb.currentIndex()==1: | |
|
1323 | opObj10=self.upObj.addOperation(name='CrossSpectraPlot',optype='other') | |
|
1324 | self.properSpecGraph(opObj10) | |
|
1325 | opObj10.addParameter(name='power_cmap', value='jet', format='str') | |
|
1326 | opObj10.addParameter(name='coherence_cmap', value='jet', format='str') | |
|
1327 | opObj10.addParameter(name='phase_cmap', value='RdBu_r', format='str') | |
|
1328 | ||
|
1329 | if self.dataTypeSelectorCmb.currentIndex()==2: | |
|
1330 | opObj10=self.upObj.addOperation(name='RTIPlot',optype='other') | |
|
1331 | self.properSpecGraph(opObj10) | |
|
1332 | ||
|
1333 | if self.dataTypeSelectorCmb.currentIndex()==3: | |
|
1334 | opObj10=self.upObj.addOperation(name='CoherenceMap',optype='other') | |
|
1335 | self.properSpecGraph(opObj10) | |
|
1336 | opObj10.addParameter(name='coherence_cmap', value='jet', format='str') | |
|
1337 | opObj10.addParameter(name='phase_cmap', value='RdBu_r', format='str') | |
|
1338 | ||
|
1339 | if self.dataTypeSelectorCmb.currentIndex()==4: | |
|
1340 | opObj10=self.upObj.addOperation(name='RTIfromNoise',optype='other') | |
|
1341 | self.properSpecGraph(opObj10) | |
|
1342 | self.setDisableAllElementSpecGraph() | |
|
1343 | print "Funciona o no" | |
|
1344 | ||
|
1345 | @pyqtSignature("") | |
|
1346 | def on_dataGraphSpecCancelBtn_clicked(self): | |
|
1347 | print "alexvaldez" | |
|
1348 | ||
|
1349 | def properSpecGraph(self,opObj10): | |
|
1350 | print opObj10.id | |
|
1351 | self.operObjList.append(opObj10) | |
|
1352 | wintitle=self.winTitleGraphSpec.text() | |
|
1353 | opObj10.addParameter(name='wintitle', value=wintitle, format='str') | |
|
1354 | idfigure=self.idfigureGraphSpec.text() | |
|
1355 | opObj10.addParameter(name='idfigure', value=idfigure, format='int') | |
|
1356 | ||
|
1357 | ||
|
1358 | channelList=self.channelListgraphSpec.text() | |
|
1359 | if self.channelListgraphSpec.isModified(): | |
|
1360 | opObj10.addParameter(name='channelList', value=channelList, format='intlist') | |
|
1361 | ||
|
1362 | xvalue= self.xminGraphSpec.text() | |
|
1363 | if self.xminGraphSpec.isModified(): | |
|
1364 | xvalueList=xvalue.split(',') | |
|
1365 | opObj10.addParameter(name='xmin', value=xvalueList[0], format='int') | |
|
1366 | opObj10.addParameter(name='xmax', value=xvalueList[1], format='int') | |
|
1367 | else: | |
|
1368 | print "cambio" | |
|
1369 | yvalue= self.yminGraphSpec.text() | |
|
1370 | if self.yminGraphSpec.isModified(): | |
|
1371 | yvalueList=yvalue.split(",") | |
|
1372 | opObj10.addParameter(name='ymin', value=yvalueList[0], format='int') | |
|
1373 | opObj10.addParameter(name='ymax', value=yvalueList[1], format='int') | |
|
1374 | else: | |
|
1375 | print "cambio" | |
|
1376 | zvalue= self.zminGraphSpec.text() | |
|
1377 | if self.zminGraphSpec.isModified(): | |
|
1378 | zvalueList=zvalue.split(",") | |
|
1379 | if opObj10.name=="RTIfromNoise": | |
|
1380 | print "No_z" | |
|
1381 | else: | |
|
1382 | if self.zminGraphSpec.isModified(): | |
|
1383 | zvalueList=zvalue.split(",") | |
|
1384 | opObj10.addParameter(name='zmin', value=zvalueList[0], format='int') | |
|
1385 | opObj10.addParameter(name='zmax', value=zvalueList[1], format='int') | |
|
1386 | opObj10.addParameter(name='showprofile', value='1', format='int') | |
|
1387 | ||
|
1388 | else: | |
|
1389 | print "cambio" | |
|
1390 | ||
|
1391 | if self.savedataCEBGraphicsVol.isChecked(): | |
|
1392 | opObj10.addParameter(name='save', value='1', format='int') | |
|
1393 | opObj10.addParameter(name='figpath', value= self.dataPathTxtSpec.text()) | |
|
1394 | opObj10.addParameter(name='figfile', value= self.dataPrefixGraphSpec.text()) | |
|
1047 | 1395 | |
|
1048 | 1396 | |
|
1049 | ||
|
1050 | ||
|
1397 | def setClearAllElementGraph(self): | |
|
1398 | self.winTitleGraphSpec.clear() | |
|
1399 | self.channelListgraphSpec.clear() | |
|
1400 | self.xminGraphSpec.clear() | |
|
1401 | self.yminGraphSpec.clear() | |
|
1402 | self.zminGraphSpec.clear() | |
|
1403 | self.timeRangeGraphSpec.clear() | |
|
1404 | self.dataPathTxtSpec.clear() | |
|
1405 | self.dataPrefixGraphSpec.clear() | |
|
1406 | ||
|
1407 | def setDisableAllElementSpecGraph(self): | |
|
1408 | self.winTitleGraphSpec.setEnabled(False) | |
|
1409 | self.channelListgraphSpec.setEnabled(False) | |
|
1410 | self.xminGraphSpec.setEnabled(False) | |
|
1411 | self.yminGraphSpec.setEnabled(False) | |
|
1412 | self.zminGraphSpec.setEnabled(False) | |
|
1413 | self.timeRangeGraphSpec.setEnabled(False) | |
|
1414 | self.dataPathTxtSpec.setEnabled(False) | |
|
1415 | self.dataPrefixGraphSpec.setEnabled(False) | |
|
1416 | # | |
|
1417 | def setEnableAllElementGraph(self): | |
|
1418 | self.winTitleGraphSpec.setEnabled(True) | |
|
1419 | self.channelListgraphSpec.setEnabled(True) | |
|
1420 | self.xminGraphSpec.setEnabled(True) | |
|
1421 | self.yminGraphSpec.setEnabled(True) | |
|
1422 | self.zminGraphSpec.setEnabled(True) | |
|
1423 | self.timeRangeGraphSpec.setEnabled(True) | |
|
1424 | # | |
|
1425 | ||
|
1426 | ||
|
1427 | ||
|
1051 | 1428 | class UnitProcess(QMainWindow, Ui_UnitProcess): |
|
1052 | 1429 | """ |
|
1053 | 1430 | Class documentation goes here. |
General Comments 0
You need to be logged in to leave comments.
Login now