|
@@ -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
|
|