This diff has been collapsed as it changes many lines, (709 lines changed) Show them Hide them | |||||
@@ -3,7 +3,9 | |||||
3 | Module implementing MainWindow. |
|
3 | Module implementing MainWindow. | |
4 | #+++++++++++++INTERFAZ DE USUARIO V1.1++++++++++++++# |
|
4 | #+++++++++++++INTERFAZ DE USUARIO V1.1++++++++++++++# | |
5 | """ |
|
5 | """ | |
6 | import os |
|
6 | import os,sys | |
|
7 | ||||
|
8 | ||||
7 | import datetime |
|
9 | import datetime | |
8 |
|
10 | |||
9 | from PyQt4.QtGui import QMainWindow |
|
11 | from PyQt4.QtGui import QMainWindow | |
@@ -17,7 +19,16 from modelProperties import treeModel | |||||
17 | from viewer.ui_unitprocess import Ui_UnitProcess |
|
19 | from viewer.ui_unitprocess import Ui_UnitProcess | |
18 | from viewer.ui_window import Ui_window |
|
20 | from viewer.ui_window import Ui_window | |
19 | from viewer.ui_mainwindow import Ui_BasicWindow |
|
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 | def isRadarFile(file): |
|
34 | def isRadarFile(file): | |
@@ -62,6 +73,7 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
62 | self.__upObjDict = {} |
|
73 | self.__upObjDict = {} | |
63 | self.__opObjDict= {} |
|
74 | self.__opObjDict= {} | |
64 | self.indexclick=None |
|
75 | self.indexclick=None | |
|
76 | self.b=0 | |||
65 |
|
77 | |||
66 | self.online=0 |
|
78 | self.online=0 | |
67 | self.datatype=0 |
|
79 | self.datatype=0 | |
@@ -113,7 +125,7 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
113 | self.treeView.setContextMenuPolicy(QtCore.Qt.CustomContextMenu) |
|
125 | self.treeView.setContextMenuPolicy(QtCore.Qt.CustomContextMenu) | |
114 | self.treeView.customContextMenuRequested.connect(self.popup) |
|
126 | self.treeView.customContextMenuRequested.connect(self.popup) | |
115 | #self.treeView.clicked.connect(self.treefunction1) |
|
127 | #self.treeView.clicked.connect(self.treefunction1) | |
116 |
|
128 | self.model_2=treeModel() | ||
117 |
|
129 | |||
118 |
|
130 | |||
119 | #-----------------------------------BARRA DE MENU-------------------------------------------------# |
|
131 | #-----------------------------------BARRA DE MENU-------------------------------------------------# | |
@@ -189,6 +201,19 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
189 | METODO EJECUTADO CUANDO OCURRE EL EVENTO RUN |
|
201 | METODO EJECUTADO CUANDO OCURRE EL EVENTO RUN | |
190 | Llama al metodo RUN. |
|
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 | print "Not implemented yet" |
|
217 | print "Not implemented yet" | |
193 |
|
218 | |||
194 | @pyqtSignature("") |
|
219 | @pyqtSignature("") | |
@@ -226,14 +251,7 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
226 | """ |
|
251 | """ | |
227 | print "Not implemented yet" |
|
252 | print "Not implemented yet" | |
228 |
|
253 | |||
229 | @pyqtSignature("") |
|
254 | ||
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 |
|
||||
237 | #-----------------------------------BARRA DE HERRAMIENTAS----------------------------------------# |
|
255 | #-----------------------------------BARRA DE HERRAMIENTAS----------------------------------------# | |
238 |
|
256 | |||
239 | @pyqtSignature("") |
|
257 | @pyqtSignature("") | |
@@ -265,6 +283,18 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
265 | METODO EJECUTADO CUANDO OCURRE EL EVENTO PAUSA |
|
283 | METODO EJECUTADO CUANDO OCURRE EL EVENTO PAUSA | |
266 | Llama al metodo PAUSA. |
|
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 | print "Not implemented yet" |
|
298 | print "Not implemented yet" | |
269 |
|
299 | |||
270 | @pyqtSignature("") |
|
300 | @pyqtSignature("") | |
@@ -287,7 +317,7 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
287 | self.setProjectParam() |
|
317 | self.setProjectParam() | |
288 |
|
318 | |||
289 | #------------------------------------VENTANA CONFIGURACION PROJECT----------------------------# |
|
319 | #------------------------------------VENTANA CONFIGURACION PROJECT----------------------------# | |
290 |
|
|
320 | ||
291 | @pyqtSignature("int") |
|
321 | @pyqtSignature("int") | |
292 | def on_dataTypeCmbBox_activated(self,index): |
|
322 | def on_dataTypeCmbBox_activated(self,index): | |
293 | """ |
|
323 | """ | |
@@ -396,7 +426,7 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
396 | reloj1=self.startTimeEdit.time() |
|
426 | reloj1=self.startTimeEdit.time() | |
397 |
|
427 | |||
398 |
|
428 | |||
399 |
reloj2=self. |
|
429 | reloj2=self.endTimeEdit.time() | |
400 |
|
430 | |||
401 | print reloj1.hour() |
|
431 | print reloj1.hour() | |
402 | print reloj1.minute() |
|
432 | print reloj1.minute() | |
@@ -414,7 +444,8 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
414 | self.readUnitConfObjList.append(self.readUnitConfObj) |
|
444 | self.readUnitConfObjList.append(self.readUnitConfObj) | |
415 |
|
445 | |||
416 | #--------VISUALIZACION EN LA VENTANA PROJECT PROPERTIES-----------------# |
|
446 | #--------VISUALIZACION EN LA VENTANA PROJECT PROPERTIES-----------------# | |
417 | self.model_2=treeModel() |
|
447 | #self.model_2=treeModel() | |
|
448 | self.model_2=treeModel() | |||
418 | self.model_2.setParams(name = self.projectObj.name, |
|
449 | self.model_2.setParams(name = self.projectObj.name, | |
419 | directorio = path, |
|
450 | directorio = path, | |
420 | workspace = "C:\\WorkspaceGUI", |
|
451 | workspace = "C:\\WorkspaceGUI", | |
@@ -427,6 +458,7 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
427 | Summary = "test de prueba") |
|
458 | Summary = "test de prueba") | |
428 |
|
459 | |||
429 | self.model_2.arbol() |
|
460 | self.model_2.arbol() | |
|
461 | self.model_2.showtree() | |||
430 | self.treeView_2.setModel(self.model_2) |
|
462 | self.treeView_2.setModel(self.model_2) | |
431 | self.treeView_2.expandAll() |
|
463 | self.treeView_2.expandAll() | |
432 |
|
464 | |||
@@ -458,17 +490,39 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
458 | self.tabVoltage.setEnabled(False) |
|
490 | self.tabVoltage.setEnabled(False) | |
459 | self.tabSpectra.setEnabled(False) |
|
491 | self.tabSpectra.setEnabled(False) | |
460 | self.tabCorrelation.setEnabled(False) |
|
492 | self.tabCorrelation.setEnabled(False) | |
461 | self.dataPathTxt.setText('C:\data') |
|
493 | self.dataPathTxt.setText('C:\data2') | |
462 | self.nameProjectTxt.setText("Test") |
|
494 | self.nameProjectTxt.setText("Test") | |
463 | self.numberChannelopVol.setEnabled(False) |
|
495 | self.numberChannelopVol.setEnabled(False) | |
|
496 | self.lineFilteropVolCEB.setEnabled(False) | |||
464 | self.lineHeighProfileTxtopVol.setEnabled(False) |
|
497 | self.lineHeighProfileTxtopVol.setEnabled(False) | |
465 | self.numberIntegration.setEnabled(False) |
|
498 | self.numberIntegration.setEnabled(False) | |
466 | self.valuenFFTPointOpSpec.setEnabled(False) |
|
499 | self.valuenFFTPointOpSpec.setEnabled(False) | |
467 | self.lineProfileSelecopVolCEB.setEnabled(False) |
|
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 | def setProjectParam(self): |
|
523 | def setProjectParam(self): | |
470 | self.nameProjectTxt.setText("Test") |
|
524 | self.nameProjectTxt.setText("Test") | |
471 | self.dataPathTxt.setText('C:\data') |
|
525 | self.dataPathTxt.setText('C:\data2') | |
472 | self.dataTypeCmbBox.clear() |
|
526 | self.dataTypeCmbBox.clear() | |
473 | self.dataTypeCmbBox.addItem("Voltage") |
|
527 | self.dataTypeCmbBox.addItem("Voltage") | |
474 | self.dataTypeCmbBox.addItem("Spectra") |
|
528 | self.dataTypeCmbBox.addItem("Spectra") | |
@@ -481,7 +535,7 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
481 | self.time.setHMS(int(starlist[0]),int(starlist[1]),int(starlist[2])) |
|
535 | self.time.setHMS(int(starlist[0]),int(starlist[1]),int(starlist[2])) | |
482 | self.startTimeEdit.setTime(self.time) |
|
536 | self.startTimeEdit.setTime(self.time) | |
483 | self.time.setHMS(int(endlist[0]),int(endlist[1]),int(endlist[2])) |
|
537 | self.time.setHMS(int(endlist[0]),int(endlist[1]),int(endlist[2])) | |
484 |
self. |
|
538 | self.endTimeEdit.setTime(self.time) | |
485 |
|
539 | |||
486 | def clickFunctiontree(self,index): |
|
540 | def clickFunctiontree(self,index): | |
487 |
|
541 | |||
@@ -518,24 +572,25 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
518 | self.time.setHMS(int(starlist[0]),int(starlist[1]),int(starlist[2])) |
|
572 | self.time.setHMS(int(starlist[0]),int(starlist[1]),int(starlist[2])) | |
519 | self.startTimeEdit.setTime(self.time) |
|
573 | self.startTimeEdit.setTime(self.time) | |
520 | self.time.setHMS(int(endlist[0]),int(endlist[1]),int(endlist[2])) |
|
574 | self.time.setHMS(int(endlist[0]),int(endlist[1]),int(endlist[2])) | |
521 |
self. |
|
575 | self.endTimeEdit.setTime(self.time) | |
522 |
|
576 | |||
523 | #--------VISUALIZACION EN LA VENTANA PROJECT PROPERTIES-----------------# |
|
577 | #--------VISUALIZACION EN LA VENTANA PROJECT PROPERTIES-----------------# | |
524 | self.model_2=treeModel() |
|
578 | # self.model_2=treeModel() | |
525 | self.model_2.setParams(name = str(self.__projObjDict[i].name), |
|
579 | # self.model_2.setParams(name = str(self.__projObjDict[i].name), | |
526 | directorio = str(self.readUnitConfObjList[i-1].path), |
|
580 | # directorio = str(self.readUnitConfObjList[i-1].path), | |
527 | workspace = "C:\\WorkspaceGUI", |
|
581 | # workspace = "C:\\WorkspaceGUI", | |
528 | remode = str(self.readModeCmBox.currentText()), |
|
582 | # remode = str(self.readModeCmBox.currentText()), | |
529 | dataformat = "Voltage", |
|
583 | # dataformat = "Voltage", | |
530 | date = str(self.readUnitConfObjList[i-1].startDate)+"-"+str(self.readUnitConfObjList[i-1].endDate), |
|
584 | # date = str(self.readUnitConfObjList[i-1].startDate)+"-"+str(self.readUnitConfObjList[i-1].endDate), | |
531 | initTime = str(starlist[0]) +":"+str(starlist[1])+":"+ str(starlist[2]), |
|
585 | # initTime = str(starlist[0]) +":"+str(starlist[1])+":"+ str(starlist[2]), | |
532 | endTime = str(endlist[0]) +":"+str(endlist[1])+":"+ str(endlist[2]), |
|
586 | # endTime = str(endlist[0]) +":"+str(endlist[1])+":"+ str(endlist[2]), | |
533 | timezone = "Local" , |
|
587 | # timezone = "Local" , | |
534 | Summary = "test de prueba") |
|
588 | # Summary = "test de prueba") | |
535 |
|
589 | # | ||
536 | self.model_2.arbol() |
|
590 | # self.model_2.arbol() | |
537 |
self. |
|
591 | # self.model_2.showtree() | |
538 |
self.treeView_2. |
|
592 | # self.treeView_2.setModel(self.model_2) | |
|
593 | # self.treeView_2.expandAll() | |||
539 |
|
594 | |||
540 | #self.dataPathTxt.setText(str(self.__projObjDict[i].addReadUnit.path())) |
|
595 | #self.dataPathTxt.setText(str(self.__projObjDict[i].addReadUnit.path())) | |
541 |
|
596 | |||
@@ -548,6 +603,7 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
548 | if self.indexclick.text()=='Spectra': |
|
603 | if self.indexclick.text()=='Spectra': | |
549 | self.tabSpectra.setEnabled(True) |
|
604 | self.tabSpectra.setEnabled(True) | |
550 | self.tabWidgetProject.setCurrentWidget(self.tabSpectra) |
|
605 | self.tabWidgetProject.setCurrentWidget(self.tabSpectra) | |
|
606 | ||||
551 |
|
607 | |||
552 | if self.indexclick.text()=='Correlation': |
|
608 | if self.indexclick.text()=='Correlation': | |
553 | self.tabCorrelation.setEnabled(True) |
|
609 | self.tabCorrelation.setEnabled(True) | |
@@ -684,7 +740,7 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
684 | self.time.setHMS(self.hour, self.min, self.sec) |
|
740 | self.time.setHMS(self.hour, self.min, self.sec) | |
685 | self.startTimeEdit.setTime(self.time) |
|
741 | self.startTimeEdit.setTime(self.time) | |
686 |
|
742 | |||
687 |
self. |
|
743 | self.endTimeEdit.setTime(self.time) | |
688 |
|
744 | |||
689 |
|
745 | |||
690 | def addUP(self): |
|
746 | def addUP(self): | |
@@ -772,12 +828,14 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
772 | self.selecHeighopVolCEB.setChecked(False) |
|
828 | self.selecHeighopVolCEB.setChecked(False) | |
773 | self.coherentIntegrationCEB.setChecked(False) |
|
829 | self.coherentIntegrationCEB.setChecked(False) | |
774 | self.profileSelecopVolCEB.setChecked(False) |
|
830 | self.profileSelecopVolCEB.setChecked(False) | |
|
831 | self.FilterCEB.setChecked(False) | |||
|
832 | ||||
775 | #self.selecChannelopVolCEB.setEnabled(False) |
|
833 | #self.selecChannelopVolCEB.setEnabled(False) | |
776 | self.lineHeighProfileTxtopVol.clear() |
|
834 | self.lineHeighProfileTxtopVol.clear() | |
777 | self.lineProfileSelecopVolCEB.clear() |
|
835 | self.lineProfileSelecopVolCEB.clear() | |
778 | self.numberChannelopVol.clear() |
|
836 | self.numberChannelopVol.clear() | |
779 | self.numberIntegration.clear() |
|
837 | self.numberIntegration.clear() | |
780 |
|
838 | self.lineFilteropVolCEB.clear() | ||
781 |
|
839 | |||
782 | def resetopSpec(self): |
|
840 | def resetopSpec(self): | |
783 |
|
841 | |||
@@ -800,10 +858,22 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
800 | print "Escribo Project" |
|
858 | print "Escribo Project" | |
801 | self.projectObj.writeXml(filename) |
|
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 | # -----------------VENTANA CONFIGURACION DE VOLTAGE---------------------------# |
|
875 | # -----------------VENTANA CONFIGURACION DE VOLTAGE---------------------------# | |
806 |
|
876 | |||
807 | @pyqtSignature("int") |
|
877 | @pyqtSignature("int") | |
808 | def on_selecChannelopVolCEB_stateChanged(self, p0): |
|
878 | def on_selecChannelopVolCEB_stateChanged(self, p0): | |
809 | """ |
|
879 | """ | |
@@ -811,14 +881,11 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
811 | """ |
|
881 | """ | |
812 | if p0==2: |
|
882 | if p0==2: | |
813 | self.numberChannelopVol.setEnabled(True) |
|
883 | self.numberChannelopVol.setEnabled(True) | |
814 | # upProcessSelect=self.upObjVolList[int(self.addOpUpselec.currentIndex())] |
|
884 | self.valueSelecChOpVol.setEnabled(True) | |
815 | # opObj10=upProcessSelect.addOperation(name='selectChannels') |
|
|||
816 | # print opObj10.id |
|
|||
817 | # self.operObjList.append(opObj10) |
|
|||
818 | print " Ingresa seleccion de Canales" |
|
885 | print " Ingresa seleccion de Canales" | |
819 | if p0==0: |
|
886 | if p0==0: | |
820 | self.numberChannelopVol.setEnabled(False) |
|
887 | self.numberChannelopVol.setEnabled(False) | |
821 |
|
888 | self.valueSelecChOpVol.setEnabled(False) | ||
822 | print " deshabilitado" |
|
889 | print " deshabilitado" | |
823 |
|
890 | |||
824 | @pyqtSignature("int") |
|
891 | @pyqtSignature("int") | |
@@ -828,33 +895,55 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
828 | """ |
|
895 | """ | |
829 | if p0==2: |
|
896 | if p0==2: | |
830 | self.lineHeighProfileTxtopVol.setEnabled(True) |
|
897 | self.lineHeighProfileTxtopVol.setEnabled(True) | |
831 | # upProcessSelect=self.upObjVolList[int(self.addOpUpselec.currentIndex())] |
|
898 | self.valueSelecHeigOpVol.setEnabled(True) | |
832 | # opObj10=upProcessSelect.addOperation(name='selectHeights') |
|
|||
833 | # print opObj10.id |
|
|||
834 | # self.operObjList.append(opObj10) |
|
|||
835 | print " Select Type of Profile" |
|
899 | print " Select Type of Profile" | |
836 | if p0==0: |
|
900 | if p0==0: | |
837 | self.lineHeighProfileTxtopVol.setEnabled(False) |
|
901 | self.lineHeighProfileTxtopVol.setEnabled(False) | |
|
902 | self.valueSelecHeigOpVol.setEnabled(False) | |||
838 | print " deshabilitado" |
|
903 | print " deshabilitado" | |
839 |
|
904 | |||
840 |
|
905 | |||
841 | @pyqtSignature("int") |
|
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 | def on_profileSelecopVolCEB_stateChanged(self, p0): |
|
919 | def on_profileSelecopVolCEB_stateChanged(self, p0): | |
843 | """ |
|
920 | """ | |
844 | Check Box habilita ingreso del rango de Perfiles |
|
921 | Check Box habilita ingreso del rango de Perfiles | |
845 | """ |
|
922 | """ | |
846 | if p0==2: |
|
923 | if p0==2: | |
847 | self.lineProfileSelecopVolCEB.setEnabled(True) |
|
924 | self.lineProfileSelecopVolCEB.setEnabled(True) | |
848 | # upProcessSelect=self.upObjVolList[int(self.addOpUpselec.currentIndex())] |
|
925 | self.profileSelecOpVol.setEnabled(True) | |
849 | # opObj10=upProcessSelect.addOperation(name='ProfileSelector', optype='other') |
|
|||
850 | # print opObj10.id |
|
|||
851 | # self.operObjList.append(opObj10) |
|
|||
852 | print " Select Type of Profile" |
|
926 | print " Select Type of Profile" | |
853 | if p0==0: |
|
927 | if p0==0: | |
854 | self.lineProfileSelecopVolCEB.setEnabled(False) |
|
928 | self.lineProfileSelecopVolCEB.setEnabled(False) | |
855 |
|
929 | self.profileSelecOpVol.setEnabled(False) | ||
856 | print " deshabilitado" |
|
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 | @pyqtSignature("int") |
|
948 | @pyqtSignature("int") | |
860 | def on_coherentIntegrationCEB_stateChanged(self, p0): |
|
949 | def on_coherentIntegrationCEB_stateChanged(self, p0): | |
@@ -863,16 +952,12 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
863 | """ |
|
952 | """ | |
864 | if p0==2: |
|
953 | if p0==2: | |
865 | self.numberIntegration.setEnabled(True) |
|
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 | print "Choose number of Cohint" |
|
955 | print "Choose number of Cohint" | |
871 | if p0==0: |
|
956 | if p0==0: | |
872 | print " deshabilitado" |
|
957 | print " deshabilitado" | |
873 | self.numberIntegration.setEnabled(False) |
|
958 | self.numberIntegration.setEnabled(False) | |
874 |
|
959 | |||
875 | #-----------------------PUSHBUTTON_ACCEPT_OPERATION----------------------------# |
|
960 | #-----------------------VOL_PUSHBUTTON_ACCEPT_OPERATION----------------------------# | |
876 |
|
961 | |||
877 | @pyqtSignature("") |
|
962 | @pyqtSignature("") | |
878 | def on_dataopVolOkBtn_clicked(self): |
|
963 | def on_dataopVolOkBtn_clicked(self): | |
@@ -885,48 +970,165 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
885 | print "INDEXCLICK=ARBOLDICT",i |
|
970 | print "INDEXCLICK=ARBOLDICT",i | |
886 | if self.__upObjDict.has_key(i)==True: |
|
971 | if self.__upObjDict.has_key(i)==True: | |
887 | self.upObj=self.__upObjDict[i] |
|
972 | self.upObj=self.__upObjDict[i] | |
888 | # self.operObjList.append(opObj10) |
|
973 | print self.__upObjDict[i].name | |
889 |
|
974 | print "TamaΓ±odeupObjDict",len(self.__upObjDict) | ||
|
975 | # if len(self.__upObjDict)>=1 and len(self.__upObjDict)> self.b: | |||
|
976 | ||||
890 | if self.selecChannelopVolCEB.isChecked(): |
|
977 | if self.selecChannelopVolCEB.isChecked(): | |
891 | opObj10=self.upObj.addOperation(name='selectChannels') |
|
978 | if self.valueSelecChOpVol.currentIndex()== 0: | |
892 | self.operObjList.append(opObj10) |
|
979 | opObj10=self.upObj.addOperation(name="selectChannels") | |
893 | value=self.numberChannelopVol.text() |
|
980 | self.operObjList.append(opObj10) | |
894 | opObj10.addParameter(name='channelList', value=value, format='intlist') |
|
981 | value=self.numberChannelopVol.text() | |
895 |
|
982 | opObj10.addParameter(name='channelList', value=value, format='intlist') | ||
896 |
|
983 | else: | ||
897 | print "channel" |
|
984 | opObj10=self.upObj.addOperation(name="selectChannelsByIndex") | |
898 |
|
985 | self.operObjList.append(opObj10) | ||
899 | if self.selecHeighopVolCEB.isChecked(): |
|
986 | value=self.numberChannelopVol.text() | |
900 | opObj10=self.upObj.addOperation(name='selectHeights') |
|
987 | opObj10.addParameter(name='channelIndexList', value=value, format='intlist') | |
901 |
print |
|
988 | print "channel" | |
902 | self.operObjList.append(opObj10) |
|
989 | ||
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 |
|
||||
911 | if self.selecHeighopVolCEB.isChecked(): |
|
990 | if self.selecHeighopVolCEB.isChecked(): | |
912 | obj10=self.upObj.addOperation(name='ProfileSelector', optype='other') |
|
991 | if self.valueSelecHeigOpVol.currentIndex()== 0: | |
913 | print opObj10.id |
|
992 | opObj10=self.upObj.addOperation(name='selectHeights') | |
914 | self.operObjList.append(opObj10) |
|
993 | value=self.lineHeighProfileTxtopVol.text() | |
915 | value=self.lineProfileSelecopVolCEB.text() |
|
994 | valueList=value.split(',') | |
916 |
obj10.addParameter(name=' |
|
995 | opObj10.addParameter(name='minHei', value=valueList[0], format='float') | |
917 |
|
996 | opObj10.addParameter(name='maxHei', value=valueList[1], format='float') | ||
918 |
|
|
997 | else: | |
919 | # if i.name=='ProfileSelector' : |
|
998 | opObj10=self.upObj.addOperation(name='selectHeightsByIndex') | |
920 |
|
|
999 | value=self.lineHeighProfileTxtopVol.text() | |
921 | # i.addParameter(name='ProfileSelector', value=value, format='intlist') |
|
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 | if self.coherentIntegrationCEB.isChecked(): |
|
1060 | if self.coherentIntegrationCEB.isChecked(): | |
924 | opObj10=self.upObj.addOperation(name='CohInt', optype='other') |
|
1061 | opObj10=self.upObj.addOperation(name='CohInt', optype='other') | |
925 | print opObj10.id |
|
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 | self.operObjList.append(opObj10) |
|
1112 | self.operObjList.append(opObj10) | |
927 |
|
|
1113 | wintitle=self.wiWineTxtGraphicsVol.text() | |
928 | opObj10.addParameter(name='n', value=value, format='int') |
|
1114 | channelList=self.channelLisstTxtVol.text() | |
929 | # self.__opObjDict[i]==self.operObjList |
|
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 | #-------------------------VENTANA DE CONFIGURACION SPECTRA------------------------# |
|
1134 | #-------------------------VENTANA DE CONFIGURACION SPECTRA------------------------# | |
@@ -943,111 +1145,286 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
943 | print " deshabilitado" |
|
1145 | print " deshabilitado" | |
944 | self.valuenFFTPointOpSpec.setEnabled(False) |
|
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 | @pyqtSignature("") |
|
1216 | @pyqtSignature("") | |
949 | def on_dataopSpecOkBtn_clicked(self): |
|
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" |
|
1221 | print "AΓADEOPERACIONSPECTRA" | |
954 |
|
||||
955 | for i in self.__arbolDict: |
|
1222 | for i in self.__arbolDict: | |
956 | if self.__arbolDict[i]==self.indexclick: |
|
1223 | if self.__arbolDict[i]==self.indexclick: | |
957 | print "INDEXCLICK=ARBOLDICT",i |
|
1224 | print "INDEXCLICK=ARBOLDICT",i | |
958 | if self.__upObjDict.has_key(i)==True: |
|
1225 | if self.__upObjDict.has_key(i)==True: | |
959 | self.upObj=self.__upObjDict[i] |
|
1226 | self.upObj=self.__upObjDict[i] | |
|
1227 | print self.__upObjDict[i].name | |||
960 | # self.operObjList.append(opObj10) |
|
1228 | # self.operObjList.append(opObj10) | |
961 |
|
1229 | |||
962 | if self.nFFTPointOpSpecCEB.isChecked(): |
|
1230 | if self.nFFTPointOpSpecCEB.isChecked(): | |
963 |
value=self. |
|
1231 | value=self.valuenFFTPointOpSpec.text() | |
964 | self.upObj.addParameter(name='nFFTPoints',value=value,format='int') |
|
1232 | self.upObj.addParameter(name='nFFTPoints',value=value,format='int') | |
965 | print "nFFTpoints" |
|
1233 | print "nFFTpoints" | |
966 |
|
|
1234 | ||
967 |
|
|
1235 | ||
968 |
|
1236 | if self.SelectHeiopSpecCEB.isChecked(): | ||
969 | #---------------------VENTANA DE CONFIGURACION GRAPH SPECTRA------------------# |
|
1237 | if self.valueSelecChOpHei.currentIndex()== 0: | |
970 |
|
1238 | opObj10=self.upObj.addOperation(name='selectHeights') | ||
971 | @pyqtSignature("int") |
|
1239 | value=self.selecHeiopSpec.text() | |
972 | def on_SpectraPlotGraphCEB_stateChanged(self, p0): |
|
1240 | valueList=value.split(',') | |
973 | """ |
|
1241 | opObj10.addParameter(name='minHei', value=valueList[0], format='float') | |
974 | Habilita la opcion de Ploteo Spectra Plot |
|
1242 | opObj10.addParameter(name='maxHei', value=valueList[1], format='float') | |
975 | """ |
|
1243 | else: | |
976 | if p0==2: |
|
1244 | opObj10=self.upObj.addOperation(name='selectHeightsByIndex') | |
977 | print "Habilitado" |
|
1245 | value=self.selecHeiopSpec.text() | |
978 |
|
1246 | valueList=value.split(',') | ||
979 | if p0==0: |
|
1247 | opObj10.addParameter(name='minIndex', value=valueList[0], format='float') | |
980 | print " deshabilitado" |
|
1248 | opObj10.addParameter(name='maxIndex', value=valueList[1], format='float') | |
981 |
|
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 | @pyqtSignature("int") |
|
1276 | @pyqtSignature("int") | |
983 | def on_CrossSpectraPlotGraphceb_stateChanged(self, p0): |
|
1277 | def on_dataTypeSelectorCmb_activated(self,index): | |
984 | """ |
|
1278 | self.setClearAllElementGraph() | |
985 | Habilita la opciοΏ½n de Ploteo CrossSpectra |
|
1279 | self.setEnableAllElementGraph() | |
986 | """ |
|
1280 | if index==0: | |
987 | if p0==2: |
|
1281 | self.timeRangeGraphSpec.setEnabled(False) | |
988 | print "Habilitado" |
|
1282 | if index==1: | |
989 | if p0==0: |
|
1283 | self.timeRangeGraphSpec.setEnabled(False) | |
990 | print " deshabilitado" |
|
1284 | if index==2: | |
|
1285 | self.timeRangeGraphSpec.setEnabled(False) | |||
|
1286 | if index==3: | |||
|
1287 | self.timeRangeGraphSpec.setEnabled(False) | |||
|
1288 | ||||
991 |
|
1289 | |||
992 | @pyqtSignature("int") |
|
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 | if p0==2: |
|
1295 | if p0==2: | |
998 | print "Habilitado" |
|
1296 | self.dataPathTxtSpec.setEnabled(True) | |
|
1297 | self.dataPrefixGraphSpec.setEnabled(True) | |||
|
1298 | print " nFFTPoint" | |||
999 | if p0==0: |
|
1299 | if p0==0: | |
1000 |
print " deshabilitado" |
|
1300 | print " deshabilitado" | |
1001 |
|
1301 | self.dataPathTxtSpec.setEnabled(False) | ||
1002 | #------------------PUSH_BUTTON_SPECTRA_GRAPH_OK-----------------------------# |
|
1302 | self.dataPrefixGraphSpec.setEnabled(False) | |
|
1303 | ||||
|
1304 | ||||
1003 | @pyqtSignature("") |
|
1305 | @pyqtSignature("") | |
1004 | def on_dataGraphSpecOkBtn_clicked(self): |
|
1306 | def on_dataGraphSpecOkBtn_clicked(self): | |
1005 |
|
|
1307 | ||
1006 | HABILITAR DE ACUERDO A LOS CHECKBOX QUE TIPO DE PLOTEOS SE VAN A REALIZAR MUESTRA Y GRABA LAS IMAGENES. |
|
1308 | print "AΓADEOPERACIONSPECTRA" | |
1007 |
|
|
1309 | ||
1008 | for i in self.__arbolDict: |
|
1310 | for i in self.__arbolDict: | |
1009 | if self.__arbolDict[i]==self.indexclick: |
|
1311 | if self.__arbolDict[i]==self.indexclick: | |
1010 | print "INDEXCLICK=ARBOLDICT",i |
|
1312 | print "INDEXCLICK=ARBOLDICT",i | |
1011 | if self.__upObjDict.has_key(i)==True: |
|
1313 | if self.__upObjDict.has_key(i)==True: | |
1012 | self.upObj=self.__upObjDict[i] |
|
1314 | self.upObj=self.__upObjDict[i] | |
1013 |
print |
|
1315 | print self.__upObjDict[i].name | |
1014 |
|
1316 | |||
1015 | if self.SpectraPlotGraphCEB_2.isChecked(): |
|
1317 | if self.dataTypeSelectorCmb.currentIndex()==0: | |
1016 | opObj10=self.upObj.addOperation(name='SpectraPlot',optype='other') |
|
1318 | opObj10=self.upObj.addOperation(name='SpectraPlot',optype='other') | |
1017 | print opObj10.id |
|
1319 | opObj10.addParameter(name='idfigure', value='1', format='int') | |
1018 |
self. |
|
1320 | self.properSpecGraph(opObj10) | |
1019 |
|
|
1321 | ||
1020 | if i.name=='SpectraPlot': |
|
1322 | if self.dataTypeSelectorCmb.currentIndex()==1: | |
1021 | i.addParameter(name='idfigure', value='1', format='int') |
|
1323 | opObj10=self.upObj.addOperation(name='CrossSpectraPlot',optype='other') | |
1022 | i.addParameter(name='wintitle', value='SpectraPlot0', format='str') |
|
1324 | self.properSpecGraph(opObj10) | |
1023 |
|
|
1325 | opObj10.addParameter(name='power_cmap', value='jet', format='str') | |
1024 |
|
|
1326 | opObj10.addParameter(name='coherence_cmap', value='jet', format='str') | |
1025 |
|
|
1327 | opObj10.addParameter(name='phase_cmap', value='RdBu_r', format='str') | |
1026 |
|
|
1328 | ||
1027 |
if self. |
|
1329 | if self.dataTypeSelectorCmb.currentIndex()==2: | |
1028 |
|
|
1330 | opObj10=self.upObj.addOperation(name='RTIPlot',optype='other') | |
1029 |
|
|
1331 | self.properSpecGraph(opObj10) | |
1030 | self.operObjList.append(opObj10) |
|
1332 | ||
1031 | for i in self.operObjList: |
|
1333 | if self.dataTypeSelectorCmb.currentIndex()==3: | |
1032 | if i.name=='CrossSpectraPlot' : |
|
1334 | opObj10=self.upObj.addOperation(name='CoherenceMap',optype='other') | |
1033 | i.addParameter(name='idfigure', value='2', format='int') |
|
1335 | self.properSpecGraph(opObj10) | |
1034 |
|
|
1336 | opObj10.addParameter(name='coherence_cmap', value='jet', format='str') | |
1035 |
|
|
1337 | opObj10.addParameter(name='phase_cmap', value='RdBu_r', format='str') | |
1036 | i.addParameter(name='zmax', value='90', format='int') |
|
1338 | ||
1037 |
|
1339 | if self.dataTypeSelectorCmb.currentIndex()==4: | ||
1038 | if self.RTIPlotGraphCEB.isChecked(): |
|
1340 | opObj10=self.upObj.addOperation(name='RTIfromNoise',optype='other') | |
1039 | opObj10=self.upObj.addOperation(name='RTIPlot',optype='other') |
|
1341 | self.properSpecGraph(opObj10) | |
1040 | print opObj10.id |
|
1342 | self.setDisableAllElementSpecGraph() | |
1041 | self.operObjList.append(opObj10) |
|
1343 | print "Funciona o no" | |
1042 | for i in self.operObjList: |
|
1344 | ||
1043 | if i.name=='RTIPlot': |
|
1345 | @pyqtSignature("") | |
1044 | i.addParameter(name='n', value='2', format='int') |
|
1346 | def on_dataGraphSpecCancelBtn_clicked(self): | |
1045 | i.addParameter(name='overlapping', value='1', format='int') |
|
1347 | print "alexvaldez" | |
1046 |
|
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 |
|
1397 | def setClearAllElementGraph(self): | ||
1050 |
|
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 | class UnitProcess(QMainWindow, Ui_UnitProcess): |
|
1428 | class UnitProcess(QMainWindow, Ui_UnitProcess): | |
1052 | """ |
|
1429 | """ | |
1053 | Class documentation goes here. |
|
1430 | Class documentation goes here. |
General Comments 0
You need to be logged in to leave comments.
Login now