Browse Source

Mac tweaks

tags/1.6.1
Trevor Irons 5 years ago
parent
commit
a7a2e0d387
2 changed files with 46 additions and 42 deletions
  1. 20
    20
      akvo/gui/main.ui
  2. 26
    22
      akvo/tressel/mrsurvey.py

+ 20
- 20
akvo/gui/main.ui View File

@@ -1068,13 +1068,13 @@ background: dark grey;
1068 1068
                 <widget class="QLCDNumber" name="lcdf0NK2">
1069 1069
                  <property name="styleSheet">
1070 1070
                   <string notr="true">#lcdf0NK2 { 
1071
- color: green;
1072
- background: black;
1071
+color: green;
1072
+background: black;
1073 1073
 }
1074 1074
 
1075 1075
 #lcdf0NK2:disabled {
1076
-  color: grey;
1077
-  background: dark grey;
1076
+color: grey;
1077
+background: dark grey;
1078 1078
 }</string>
1079 1079
                  </property>
1080 1080
                 </widget>
@@ -1083,13 +1083,13 @@ background: dark grey;
1083 1083
                 <widget class="QLCDNumber" name="lcdf0NK">
1084 1084
                  <property name="styleSheet">
1085 1085
                   <string notr="true">#lcdf0NK { 
1086
- color: green;
1087
- background: black;
1086
+color: green;
1087
+background: black;
1088 1088
 }
1089 1089
 
1090 1090
 #lcdf0NK:disabled {
1091
-  color: grey;
1092
-  background: dark grey;
1091
+color: grey;
1092
+background: dark grey;
1093 1093
 }</string>
1094 1094
                  </property>
1095 1095
                  <property name="intValue" stdset="0">
@@ -1132,13 +1132,13 @@ background: dark grey;
1132 1132
                 <widget class="QLCDNumber" name="lcdHNF">
1133 1133
                  <property name="styleSheet">
1134 1134
                   <string notr="true">#lcdHNF {
1135
-  color: green;
1136
-  background: black;
1135
+color: green;
1136
+background: black;
1137 1137
 }
1138 1138
 
1139 1139
 #lcdHNF:disabled {
1140
-  color: grey;
1141
-  background: dark grey;
1140
+color: grey;
1141
+background: dark grey;
1142 1142
 }</string>
1143 1143
                  </property>
1144 1144
                 </widget>
@@ -1147,13 +1147,13 @@ background: dark grey;
1147 1147
                 <widget class="QLCDNumber" name="lcdH1F">
1148 1148
                  <property name="styleSheet">
1149 1149
                   <string notr="true">#lcdH1F {
1150
-  color: green;
1151
-  background: black;
1150
+color: green;
1151
+background: black;
1152 1152
 }
1153 1153
 
1154 1154
 #lcdH1F:disabled {
1155
-  color: grey;
1156
-  background: dark grey;
1155
+color: grey;
1156
+background: dark grey;
1157 1157
 }</string>
1158 1158
                  </property>
1159 1159
                 </widget>
@@ -1162,13 +1162,13 @@ background: dark grey;
1162 1162
                 <widget class="QLCDNumber" name="lcdH1F2">
1163 1163
                  <property name="styleSheet">
1164 1164
                   <string notr="true">#lcdH1F2{ 
1165
- color: green;
1166
- background: black;
1165
+color: green;
1166
+background: black;
1167 1167
 }
1168 1168
 
1169 1169
 #lcdH1F2:disabled {
1170
-  color: grey;
1171
-  background: dark grey;
1170
+color: red;
1171
+background: dark grey;
1172 1172
 }</string>
1173 1173
                  </property>
1174 1174
                 </widget>

+ 26
- 22
akvo/tressel/mrsurvey.py View File

@@ -2588,7 +2588,7 @@ class GMRDataProcessor(SNMRDataProcessor):
2588 2588
         """
2589 2589
 
2590 2590
         import struct
2591
-        canvas.reAx2()
2591
+        canvas.reAx3()
2592 2592
 
2593 2593
         # not in any headers but this has changed, NOT the place to do this. MOVE  
2594 2594
         self.prePulseDelay  = 0.01           # delay before pulse
@@ -2657,8 +2657,9 @@ class GMRDataProcessor(SNMRDataProcessor):
2657 2657
                     for irec in range(N_samp):
2658 2658
                         DATA[irec,ichan] = struct.unpack('>f', DATADUMP[irec*4:irec*4+4])[0]
2659 2659
                 if plot: 
2660
-                    canvas.ax1.clear()
2661
-                    canvas.ax2.clear()
2660
+                    #canvas.ax1.clear()
2661
+                    #canvas.ax2.clear()
2662
+                    canvas.softClear()
2662 2663
                 li = np.shape( DATA[:,4][nd2s:nd2s+nd2] )[0]               
2663 2664
 
2664 2665
                 ######################################
@@ -2671,16 +2672,17 @@ class GMRDataProcessor(SNMRDataProcessor):
2671 2672
                         self.DATADICT["Pulse 1"]["CURRENT"][ipm][istack] = DATA[:,1][nps:nps+npul] * invCGain
2672 2673
                         self.DATADICT["Pulse 1"]["PULSE_TIMES"] = TIMES[nps:nps+npul] 
2673 2674
                         if plot:
2674
-                            canvas.ax1.plot(self.DATADICT["Pulse 1"]["TIMES"],       self.DATADICT["Pulse 1"][ichan][ipm][istack], label="Pulse 1 FID data ch. "+str(ichan)) #, color='blue')
2675
-                            canvas.ax2.plot(self.DATADICT["Pulse 1"]["PULSE_TIMES"], self.DATADICT["Pulse 1"]["CURRENT"][ipm][istack] , color='black')
2675
+                            canvas.ax3.plot(self.DATADICT["Pulse 1"]["TIMES"],       self.DATADICT["Pulse 1"][ichan][ipm][istack], label="Pulse 1 FID data ch. "+str(ichan)) #, color='blue')
2676
+                            canvas.ax1.plot(self.DATADICT["Pulse 1"]["PULSE_TIMES"], self.DATADICT["Pulse 1"]["CURRENT"][ipm][istack] , color='black')
2676 2677
                     elif FIDProc == "Pulse 2":
2678
+                        print("TODO fix y scale")
2677 2679
                         self.DATADICT["Pulse 2"][ichan][ipm][istack] = DATA[:,ichan+3][nd2s:nd2s+nd2] *invGain
2678 2680
                         self.DATADICT["Pulse 2"]["TIMES"] = TIMES[nd2s:nd2s+nd2]
2679 2681
                         self.DATADICT["Pulse 2"]["CURRENT"][ipm][istack] = DATA[:,1][nps2:nps2+np2] * invCGain
2680 2682
                         self.DATADICT["Pulse 2"]["PULSE_TIMES"] = TIMES[nps2:nps2+np2] 
2681 2683
                         if plot:
2682
-                            canvas.ax1.plot(self.DATADICT["Pulse 2"]["TIMES"], self.DATADICT["Pulse 2"][ichan][ipm][istack], label="Pulse 2 FID data ch. "+str(ichan)) #, color='blue')
2683
-                            canvas.ax2.plot( self.DATADICT["Pulse 2"]["PULSE_TIMES"], self.DATADICT["Pulse 2"]["CURRENT"][ipm][istack], color='black' )
2684
+                            canvas.ax3.plot(self.DATADICT["Pulse 2"]["TIMES"], self.DATADICT["Pulse 2"][ichan][ipm][istack], label="Pulse 2 FID data ch. "+str(ichan)) #, color='blue')
2685
+                            canvas.ax1.plot( self.DATADICT["Pulse 2"]["PULSE_TIMES"], self.DATADICT["Pulse 2"]["CURRENT"][ipm][istack], color='black' )
2684 2686
                     else:
2685 2687
                         self.DATADICT["Pulse 1"][ichan][ipm][istack] = DATA[:,ichan+3][nds:nds+nd1] * invGain
2686 2688
                         self.DATADICT["Pulse 2"][ichan][ipm][istack] = DATA[:,ichan+3][nd2s:nd2s+nd2] * invGain
@@ -2691,41 +2693,43 @@ class GMRDataProcessor(SNMRDataProcessor):
2691 2693
                         self.DATADICT["Pulse 2"]["CURRENT"][ipm][istack] = DATA[:,1][nps2:nps2+np2] * invCGain
2692 2694
                         self.DATADICT["Pulse 2"]["PULSE_TIMES"] = TIMES[nps2:nps2+np2] 
2693 2695
                         if plot:
2694
-                            canvas.ax1.plot(self.DATADICT["Pulse 1"]["TIMES"], self.DATADICT["Pulse 1"][ichan][ipm][istack], label="Pulse 1 FID data ch. "+str(ichan)) #, color='blue')
2695
-                            canvas.ax1.plot(self.DATADICT["Pulse 2"]["TIMES"], self.DATADICT["Pulse 2"][ichan][ipm][istack], label="Pulse 2 FID data ch. "+str(ichan)) #, color='blue')
2696
-                            canvas.ax2.plot( self.DATADICT["Pulse 1"]["PULSE_TIMES"], self.DATADICT["Pulse 1"]["CURRENT"][ipm][istack] , color='black' )
2697
-                            canvas.ax2.plot( self.DATADICT["Pulse 2"]["PULSE_TIMES"], self.DATADICT["Pulse 2"]["CURRENT"][ipm][istack] , color='black')
2696
+                            canvas.ax3.plot(self.DATADICT["Pulse 1"]["TIMES"], self.DATADICT["Pulse 1"][ichan][ipm][istack], label="Pulse 1 FID data ch. "+str(ichan)) #, color='blue')
2697
+                            canvas.ax3.plot(self.DATADICT["Pulse 2"]["TIMES"], self.DATADICT["Pulse 2"][ichan][ipm][istack], label="Pulse 2 FID data ch. "+str(ichan)) #, color='blue')
2698
+                            canvas.ax1.plot( self.DATADICT["Pulse 1"]["PULSE_TIMES"], self.DATADICT["Pulse 1"]["CURRENT"][ipm][istack] , color='black' )
2699
+                            canvas.ax1.plot( self.DATADICT["Pulse 2"]["PULSE_TIMES"], self.DATADICT["Pulse 2"]["CURRENT"][ipm][istack] , color='black')
2698 2700
                 
2699 2701
                 for ichan in rchan:
2700 2702
                     if FIDProc == "Pulse 1":
2701 2703
                         self.DATADICT["Pulse 1"][ichan][ipm][istack] = DATA[:,ichan+3][nds:nds+nd1] * invGain 
2702 2704
                         self.DATADICT["Pulse 1"]["TIMES"] = TIMES[nds:nds+nd1]
2703 2705
                         if plot:
2704
-                            canvas.ax1.plot(self.DATADICT["Pulse 1"]["TIMES"], self.DATADICT["Pulse 1"][ichan][ipm][istack], label="Pulse 1 FID ref ch. "+str(ichan)) #, color='blue')
2706
+                            canvas.ax2.plot(self.DATADICT["Pulse 1"]["TIMES"], self.DATADICT["Pulse 1"][ichan][ipm][istack], label="Pulse 1 FID ref ch. "+str(ichan)) #, color='blue')
2705 2707
                     elif FIDProc == "Pulse 2":
2706 2708
                         self.DATADICT["Pulse 2"][ichan][ipm][istack] = DATA[:,ichan+3][nd2s:nd2s+nd2] * invGain
2707 2709
                         self.DATADICT["Pulse 2"]["TIMES"] = TIMES[nd2s:nd2s+nd2]
2708 2710
                         if plot:
2709
-                            canvas.ax1.plot(self.DATADICT["Pulse 2"]["TIMES"], self.DATADICT["Pulse 2"][ichan][ipm][istack], label="Pulse 2 FID ref ch. "+str(ichan)) #, color='blue')
2711
+                            canvas.ax2.plot(self.DATADICT["Pulse 2"]["TIMES"], self.DATADICT["Pulse 2"][ichan][ipm][istack], label="Pulse 2 FID ref ch. "+str(ichan)) #, color='blue')
2710 2712
                     else:
2711 2713
                         self.DATADICT["Pulse 1"][ichan][ipm][istack] = DATA[:,ichan+3][nds:nds+nd1] * invGain
2712 2714
                         self.DATADICT["Pulse 2"][ichan][ipm][istack] = DATA[:,ichan+3][nd2s:nd2s+nd2] * invGain
2713 2715
                         self.DATADICT["Pulse 1"]["TIMES"] = TIMES[nds:nds+nd1]
2714 2716
                         self.DATADICT["Pulse 2"]["TIMES"] = TIMES[nd2s:nd2s+nd2]
2715 2717
                         if plot:
2716
-                            canvas.ax1.plot(self.DATADICT["Pulse 1"]["TIMES"], self.DATADICT["Pulse 1"][ichan][ipm][istack], label="Pulse 1 FID ref ch. "+str(ichan)) #, color='blue')
2717
-                            canvas.ax1.plot(self.DATADICT["Pulse 2"]["TIMES"], self.DATADICT["Pulse 2"][ichan][ipm][istack], label="Pulse 2 FID ref ch. "+str(ichan)) #, color='blue')
2718
+                            canvas.ax2.plot(self.DATADICT["Pulse 1"]["TIMES"], self.DATADICT["Pulse 1"][ichan][ipm][istack], label="Pulse 1 FID ref ch. "+str(ichan)) #, color='blue')
2719
+                            canvas.ax2.plot(self.DATADICT["Pulse 2"]["TIMES"], self.DATADICT["Pulse 2"][ichan][ipm][istack], label="Pulse 2 FID ref ch. "+str(ichan)) #, color='blue')
2718 2720
                 
2719 2721
                 if plot:
2720
-                    canvas.ax1.legend(prop={'size':6}, loc='upper right')
2722
+                    canvas.ax3.legend(prop={'size':6}, loc='upper right')
2723
+                    canvas.ax2.legend(prop={'size':6}, loc='upper right')
2721 2724
                     canvas.ax1.set_title("stack "+str(istack)+" pulse index " + str(ipm), fontsize=8)
2722 2725
                     canvas.ax1.set_xlabel("time [s]", fontsize=8)
2723
-                    canvas.ax1.set_ylabel("RAW signal [V]", fontsize=8)
2724
-                    canvas.ax2.set_ylabel("Current [A]", fontsize=8) 
2725
-                    canvas.ax2.tick_params(axis='both', which='major', labelsize=8)
2726
-                    canvas.ax2.tick_params(axis='both', which='minor', labelsize=6)
2727
-                    canvas.ax2.ticklabel_format(style='sci', scilimits=(0,0), axis='y') 
2728
-                    canvas.ax1.ticklabel_format(style='sci', scilimits=(0,0), axis='y') 
2726
+                    canvas.ax3.set_ylabel("RAW signal [V]", fontsize=8)
2727
+                    canvas.ax2.set_ylabel("RAW signal [V]", fontsize=8)
2728
+                    canvas.ax1.set_ylabel("Current [A]", fontsize=8) 
2729
+                    #canvas.ax2.tick_params(axis='both', which='major', labelsize=8)
2730
+                    #canvas.ax2.tick_params(axis='both', which='minor', labelsize=6)
2731
+                    #canvas.ax2.ticklabel_format(style='sci', scilimits=(0,0), axis='y') 
2732
+                    #canvas.ax1.ticklabel_format(style='sci', scilimits=(0,0), axis='y') 
2729 2733
 
2730 2734
                     canvas.draw()
2731 2735
 

Loading…
Cancel
Save