|
@@ -17,6 +17,9 @@ import matplotlib.pyplot as plt
|
17
|
17
|
import matplotlib.ticker
|
18
|
18
|
from matplotlib.ticker import MaxNLocator
|
19
|
19
|
|
|
20
|
+import seaborn as sns
|
|
21
|
+from akvo.tressel.SlidesPlot import deSpine
|
|
22
|
+
|
20
|
23
|
import multiprocessing
|
21
|
24
|
import itertools
|
22
|
25
|
|
|
@@ -301,6 +304,7 @@ class GMRDataProcessor(SNMRDataProcessor):
|
301
|
304
|
pass
|
302
|
305
|
|
303
|
306
|
def TDSmartStack(self, outlierTest, MADcutoff, canvas):
|
|
307
|
+ fs = 10 # fontsize
|
304
|
308
|
#print("Line 300 in mrsurvey")
|
305
|
309
|
Stack = {}
|
306
|
310
|
# align for stacking and modulate
|
|
@@ -362,11 +366,11 @@ class GMRDataProcessor(SNMRDataProcessor):
|
362
|
366
|
ax1.yaxis.set_major_formatter(y_formatter)
|
363
|
367
|
|
364
|
368
|
ax1.plot( 1e3*self.DATADICT[pulse]["TIMES"], np.average( SimpleStack[pulse][chan], 0 )) #, color='darkblue' )
|
365
|
|
- ax1.set_title("Ch." + str(chan) + ": avg FID", fontsize=8)
|
366
|
|
- ax1.set_xlabel(r"time (ms)", fontsize=8)
|
|
369
|
+ ax1.set_title("Ch." + str(chan) + ": avg FID", fontsize=fs)
|
|
370
|
+ ax1.set_xlabel(r"time (ms)", fontsize=fs)
|
367
|
371
|
|
368
|
372
|
if ichan == 0:
|
369
|
|
- ax1.set_ylabel(r"signal (nV)", fontsize=8)
|
|
373
|
+ ax1.set_ylabel(r"signal (nV)", fontsize=fs)
|
370
|
374
|
else:
|
371
|
375
|
plt.setp(ax1.get_yticklabels(), visible=False)
|
372
|
376
|
plt.setp(ax1.get_yaxis().get_offset_text(), visible=False)
|
|
@@ -503,7 +507,7 @@ class GMRDataProcessor(SNMRDataProcessor):
|
503
|
507
|
#im2 = ax2.matshow( db, aspect='auto', cmap=cmocean.cm.ice, vmin=vvmin, vmax=vvmax)
|
504
|
508
|
if ichan == 0:
|
505
|
509
|
#ax2.set_ylabel(r"$q$ (A $\cdot$ s)", fontsize=8)
|
506
|
|
- ax2.set_ylabel(r"pulse index", fontsize=8)
|
|
510
|
+ ax2.set_ylabel(r"pulse index", fontsize=10)
|
507
|
511
|
#ax1.set_ylabel(r"FID (nV)", fontsize=8)
|
508
|
512
|
else:
|
509
|
513
|
#ax2.yaxis.set_ticklabels([])
|
|
@@ -528,15 +532,17 @@ class GMRDataProcessor(SNMRDataProcessor):
|
528
|
532
|
ichan += 1
|
529
|
533
|
|
530
|
534
|
|
531
|
|
- canvas.fig.subplots_adjust(hspace=.1, wspace=.05, left=.075, right=.95 )#left=None, bottom=None, right=None, top=None, wspace=None, hspace=None)
|
|
535
|
+ canvas.fig.subplots_adjust(hspace=.35, wspace=.15, left=.15, right=.8 )#left=None, bottom=None, right=None, top=None, wspace=None, hspace=None)
|
|
536
|
+ deSpine(ax1)
|
532
|
537
|
|
533
|
538
|
#cb1 = canvas.fig.colorbar(im, ax=axes[0::2], format='%1.0e', orientation='horizontal', shrink=.35, aspect=30)
|
534
|
539
|
#cb1.ax.tick_params(axis='both', which='major', labelsize=8)
|
535
|
540
|
#cb1.set_label("$\mathcal{V}_N$ (nV)", fontsize=8)
|
536
|
541
|
|
537
|
542
|
cb2 = canvas.fig.colorbar(im2[-1], ax=axes[1::2], format='%1.0e', orientation='horizontal', shrink=.35, aspect=30)
|
538
|
|
- cb2.ax.tick_params(axis='both', which='major', labelsize=8)
|
539
|
|
- cb2.set_label("$\mathcal{V}_N$ (nV)", fontsize=8)
|
|
543
|
+ cb2.ax.tick_params(axis='both', which='major', labelsize=fs)
|
|
544
|
+ cb2.set_label(r"$\left| \mathcal{V}_N \right|$ (nV)", fontsize=fs)
|
|
545
|
+
|
540
|
546
|
|
541
|
547
|
#canvas.fig.tight_layout()
|
542
|
548
|
canvas.draw()
|
|
@@ -564,15 +570,16 @@ class GMRDataProcessor(SNMRDataProcessor):
|
564
|
570
|
canvas = mpl plotting axis
|
565
|
571
|
"""
|
566
|
572
|
TDPlot = True
|
567
|
|
-
|
|
573
|
+ fs = 10
|
|
574
|
+
|
568
|
575
|
if plot:
|
569
|
576
|
canvas.reAx2(shy=False)
|
570
|
|
- canvas.ax1.set_ylabel(r"signal (nV)", fontsize=8)
|
571
|
|
- canvas.ax2.set_ylabel(r"signal (nV)", fontsize=8)
|
|
577
|
+ canvas.ax1.set_ylabel(r"signal (nV)", fontsize=fs)
|
|
578
|
+ canvas.ax2.set_ylabel(r"signal (nV)", fontsize=fs)
|
572
|
579
|
if TDPlot:
|
573
|
|
- canvas.ax2.set_xlabel(r"time (s)", fontsize=8)
|
|
580
|
+ canvas.ax2.set_xlabel(r"time (s)", fontsize=fs)
|
574
|
581
|
else:
|
575
|
|
- canvas.ax2.set_xlabel(r"frequency (Hz)", fontsize=8)
|
|
582
|
+ canvas.ax2.set_xlabel(r"frequency (Hz)", fontsize=fs)
|
576
|
583
|
canvas.ax1.set_yscale('log')
|
577
|
584
|
canvas.ax2.set_yscale('log')
|
578
|
585
|
|
|
@@ -703,8 +710,12 @@ class GMRDataProcessor(SNMRDataProcessor):
|
703
|
710
|
|
704
|
711
|
if plot:
|
705
|
712
|
if procRefs:
|
706
|
|
- canvas.ax1.legend(prop={'size':6}, loc='upper right')
|
707
|
|
- canvas.ax2.legend(prop={'size':6}, loc='upper right')
|
|
713
|
+ canvas.ax1.legend(prop={'size':fs}, loc='upper right')
|
|
714
|
+ plt.setp(canvas.ax1.get_xticklabels(), visible=False)
|
|
715
|
+ canvas.ax2.legend(prop={'size':fs}, loc='upper right')
|
|
716
|
+ deSpine(canvas.ax1)
|
|
717
|
+ deSpine(canvas.ax2)
|
|
718
|
+ canvas.fig.tight_layout()
|
708
|
719
|
canvas.draw()
|
709
|
720
|
|
710
|
721
|
percent = (int)(1e2*((ipm+istack*self.nPulseMoments)/(self.nPulseMoments*len(self.DATADICT["stacks"]))))
|
|
@@ -766,11 +777,11 @@ class GMRDataProcessor(SNMRDataProcessor):
|
766
|
777
|
#ax1.plot( 1e3*self.DATADICT[pulse][chan]["FFT"]["nu"][0:len(SimpleStack[pulse][chan])], np.average(SimpleStack[pulse][chan], 0 )) #, color='darkblue' )
|
767
|
778
|
#ax1.pcolor( np.real(SimpleStack[pulse][chan]) ) #, color='darkblue' )
|
768
|
779
|
ax1.matshow( np.real(SimpleStack[pulse][chan]), aspect='auto') #, color='darkblue' )
|
769
|
|
- ax1.set_title("Ch." + str(chan) + ": avg FID", fontsize=8)
|
770
|
|
- ax1.set_xlabel(r"time (ms)", fontsize=8)
|
|
780
|
+ ax1.set_title("Ch." + str(chan) + ": avg FID", fontsize=10)
|
|
781
|
+ ax1.set_xlabel(r"time (ms)", fontsize=10)
|
771
|
782
|
|
772
|
783
|
if ichan == 0:
|
773
|
|
- ax1.set_ylabel(r"signal [nV]", fontsize=8)
|
|
784
|
+ ax1.set_ylabel(r"signal [nV]", fontsize=10)
|
774
|
785
|
else:
|
775
|
786
|
plt.setp(ax1.get_yticklabels(), visible=False)
|
776
|
787
|
plt.setp(ax1.get_yaxis().get_offset_text(), visible=False)
|
|
@@ -932,6 +943,7 @@ class GMRDataProcessor(SNMRDataProcessor):
|
932
|
943
|
# cb2.set_label("$\mathcal{V}_N$ (nV)", fontsize=8)
|
933
|
944
|
|
934
|
945
|
#canvas.fig.tight_layout()
|
|
946
|
+ deSpine(ax1)
|
935
|
947
|
canvas.draw()
|
936
|
948
|
self.doneTrigger.emit()
|
937
|
949
|
|
|
@@ -1034,8 +1046,8 @@ class GMRDataProcessor(SNMRDataProcessor):
|
1034
|
1046
|
ht = signal.hilbert(xn)*np.exp(-1j*wL*self.DATADICT[pulse]["TIMES"])
|
1035
|
1047
|
#############################################################
|
1036
|
1048
|
# Quadrature signal
|
1037
|
|
- RE[pulse][chan][ipm,:] = np.real(ht[clip::])
|
1038
|
|
- IM[pulse][chan][ipm,:] = np.imag(ht[clip::])
|
|
1049
|
+ RE[pulse][chan][ipm,:] = -np.real(ht[clip::]) # negative for consistency with VC
|
|
1050
|
+ IM[pulse][chan][ipm,:] = np.imag(ht[clip::])
|
1039
|
1051
|
REmax[pulse] = max(REmax[pulse], np.max(np.real(ht[clip::])))
|
1040
|
1052
|
IMmax[pulse] = max(IMmax[pulse], np.max(np.imag(ht[clip::])))
|
1041
|
1053
|
#############################################################
|
|
@@ -1084,7 +1096,8 @@ class GMRDataProcessor(SNMRDataProcessor):
|
1084
|
1096
|
|
1085
|
1097
|
###############
|
1086
|
1098
|
# Plot on GUI #
|
1087
|
|
- ###############
|
|
1099
|
+ ###############
|
|
1100
|
+ fs = 10
|
1088
|
1101
|
dcmap = cmocean.cm.curl_r #"seismic_r" #cmocean.cm.balance_r #"RdBu" #YlGn" # "coolwarm_r" # diverging
|
1089
|
1102
|
canvas.reAxH2( len(self.DATADICT[ self.DATADICT["PULSES"][0] ]["chan"] ), False, False)
|
1090
|
1103
|
for pulse in self.DATADICT["PULSES"]:
|
|
@@ -1103,29 +1116,27 @@ class GMRDataProcessor(SNMRDataProcessor):
|
1103
|
1116
|
|
1104
|
1117
|
for chan in self.DATADICT[pulse]["chan"]:
|
1105
|
1118
|
ax1 = axes[2*ichan ]
|
1106
|
|
- ax2 = axes[2*ichan+1] # TODO fix hard coded number
|
|
1119
|
+ ax2 = axes[2*ichan+1]
|
1107
|
1120
|
if phase == 0: # Re Im
|
1108
|
|
- #print("plot dog", np.shape(QQ), np.shape(self.DATADICT["RE"][pulse][chan]))
|
1109
|
|
- #print("QQ", QQ)
|
1110
|
1121
|
im1 = ax1.pcolormesh( time_sp, QQ[iQ], self.DATADICT["RE"][pulse][chan][iQ], cmap=dcmap, \
|
1111
|
|
- vmin=-self.DATADICT["REmax"][pulse] , vmax=self.DATADICT["REmax"][pulse] )
|
|
1122
|
+ vmin=-self.DATADICT["REmax"][pulse] , vmax=self.DATADICT["REmax"][pulse] , rasterized=True)
|
1112
|
1123
|
im2 = ax2.pcolormesh( time_sp, QQ[iQ], self.DATADICT["IM"][pulse][chan][iQ], cmap=dcmap, \
|
1113
|
|
- vmin=-self.DATADICT["IMmax"][pulse], vmax=self.DATADICT["IMmax"][pulse] )
|
|
1124
|
+ vmin=-self.DATADICT["IMmax"][pulse], vmax=self.DATADICT["IMmax"][pulse] , rasterized=True )
|
1114
|
1125
|
#im1 = ax1.matshow( self.DATADICT["RE"][pulse][chan][iQ], cmap=dcmap, aspect='auto', \
|
1115
|
1126
|
# vmin=-self.DATADICT["REmax"][pulse] , vmax=self.DATADICT["REmax"][pulse] )
|
1116
|
1127
|
#im2 = ax2.matshow( self.DATADICT["IM"][pulse][chan][iQ], cmap=dcmap, aspect='auto', \
|
1117
|
1128
|
# vmin=-self.DATADICT["REmax"][pulse] , vmax=self.DATADICT["REmax"][pulse] )
|
1118
|
1129
|
if phase == 1: # Amp phase
|
1119
|
1130
|
im1 = ax1.pcolormesh( time_sp, QQ[iQ], self.DATADICT["CA"][pulse][chan][iQ], cmap=dcmap, \
|
1120
|
|
- vmin=-self.DATADICT["CAmax"][pulse] , vmax=self.DATADICT["CAmax"][pulse] )
|
|
1131
|
+ vmin=-self.DATADICT["CAmax"][pulse] , vmax=self.DATADICT["CAmax"][pulse], rasterized=True )
|
1121
|
1132
|
#im2 = ax2.pcolormesh( time_sp, QQ, self.DATADICT["IP"][pulse][chan], cmap=cmocean.cm.balance, rasterized=True,\
|
1122
|
1133
|
im2 = ax2.pcolormesh( time_sp, QQ[iQ], self.DATADICT["IP"][pulse][chan][iQ], cmap=cmocean.cm.delta, \
|
1123
|
|
- vmin=-np.pi, vmax=np.pi)
|
|
1134
|
+ vmin=-np.pi, vmax=np.pi, rasterized=True)
|
1124
|
1135
|
if phase == 2: # CA NR
|
1125
|
1136
|
im1 = ax1.pcolormesh( time_sp, QQ[iQ], self.DATADICT["CA"][pulse][chan][iQ], cmap=dcmap, \
|
1126
|
|
- vmin=-self.DATADICT["CAmax"][pulse] , vmax=self.DATADICT["CAmax"][pulse] )
|
|
1137
|
+ vmin=-self.DATADICT["CAmax"][pulse] , vmax=self.DATADICT["CAmax"][pulse], rasterized=True )
|
1127
|
1138
|
im2 = ax2.pcolormesh( time_sp, QQ[iQ], self.DATADICT["NR"][pulse][chan][iQ], cmap=dcmap, \
|
1128
|
|
- vmin=-self.DATADICT["NRmax"][pulse] , vmax=self.DATADICT["NRmax"][pulse] )
|
|
1139
|
+ vmin=-self.DATADICT["NRmax"][pulse] , vmax=self.DATADICT["NRmax"][pulse], rasterized=True )
|
1129
|
1140
|
# cb2 = canvas.fig.colorbar(im2, ax=ax2, format='%1.0e')
|
1130
|
1141
|
# cb2.set_label("Noise residual (nV)", fontsize=8)
|
1131
|
1142
|
# cb2.ax.tick_params(axis='both', which='major', labelsize=8)
|
|
@@ -1150,8 +1161,8 @@ class GMRDataProcessor(SNMRDataProcessor):
|
1150
|
1161
|
self.progressTrigger.emit(percent)
|
1151
|
1162
|
|
1152
|
1163
|
if ichan == 0:
|
1153
|
|
- ax1.set_ylabel(r"$q$ ( $\mathrm{A}\cdot\mathrm{s}$)", fontsize=8)
|
1154
|
|
- ax2.set_ylabel(r"$q$ ( $\mathrm{A}\cdot\mathrm{s}$)", fontsize=8)
|
|
1164
|
+ ax1.set_ylabel(r"$q$ ( $\mathrm{A}\cdot\mathrm{s}$)", fontsize=fs)
|
|
1165
|
+ ax2.set_ylabel(r"$q$ ( $\mathrm{A}\cdot\mathrm{s}$)", fontsize=fs)
|
1155
|
1166
|
else:
|
1156
|
1167
|
#ax2.yaxis.set_ticklabels([])
|
1157
|
1168
|
#ax1.yaxis.set_ticklabels([])
|
|
@@ -1171,29 +1182,40 @@ class GMRDataProcessor(SNMRDataProcessor):
|
1171
|
1182
|
ax2.set_xlim( np.min(time_sp), np.max(time_sp) )
|
1172
|
1183
|
|
1173
|
1184
|
#ax2.set_xlabel(r"Time since end of pulse (ms)", fontsize=8)
|
1174
|
|
- ax2.set_xlabel(r"Time (ms)", fontsize=8)
|
|
1185
|
+ ax2.set_xlabel(r"time (ms)", fontsize=fs)
|
|
1186
|
+
|
|
1187
|
+ #canvas.fig.subplots_adjust(hspace=.15, wspace=.05, left=.15, right=.85, bottom=.15, top=.9 )#left=None, bottom=None, right=None, top=None, wspace=None, hspace=None)
|
|
1188
|
+ canvas.fig.subplots_adjust(hspace=.15, wspace=.05, left=.15, right=.90, bottom=.15, top=.95 )#left=None, bottom=None, right=None, top=None, wspace=None, hspace=None)
|
1175
|
1189
|
|
1176
|
|
- canvas.fig.subplots_adjust(hspace=.15, wspace=.05, left=.075, right=.95, bottom=.1, top=.95 )#left=None, bottom=None, right=None, top=None, wspace=None, hspace=None)
|
1177
|
1190
|
tick_locator = MaxNLocator(nbins=3)
|
1178
|
1191
|
|
1179
|
|
- cb1 = canvas.fig.colorbar(im1, ax=axes[0::2], format='%1.0e', orientation='horizontal', shrink=.35, aspect=30)
|
1180
|
|
- cb1.ax.tick_params(axis='both', which='major', labelsize=8)
|
1181
|
|
- cb1.set_label("$\mathcal{V}_N$ (nV)", fontsize=8)
|
|
1192
|
+ cb1 = canvas.fig.colorbar(im1, ax=axes[0::2], format='%1.0f', orientation='vertical')
|
|
1193
|
+ #cb1 = canvas.fig.colorbar(im1, ax=axes[0::2], format='%1.0f', orientation='horizontal', shrink=.35, aspect=30, pad=.4)
|
|
1194
|
+ cb1.ax.tick_params(axis='both', which='major', labelsize=fs)
|
|
1195
|
+
|
1182
|
1196
|
cb1.locator = tick_locator
|
1183
|
1197
|
cb1.update_ticks()
|
1184
|
1198
|
|
1185
|
1199
|
tick_locator2 = MaxNLocator(nbins=3)
|
1186
|
|
- cb2 = canvas.fig.colorbar(im2, ax=axes[1::2], format='%1.0e', orientation='horizontal', shrink=.35, aspect=30, pad=.2)
|
1187
|
|
- cb2.ax.tick_params(axis='both', which='major', labelsize=8)
|
1188
|
|
- if phase == 1: # Amp phase
|
1189
|
|
- cb2.set_label(r"$\angle \mathcal{V}_N$", fontsize=8)
|
|
1200
|
+ cb2 = canvas.fig.colorbar(im2, ax=axes[1::2], format='%1.0f', orientation='vertical')
|
|
1201
|
+ #cb2 = canvas.fig.colorbar(im2, ax=axes[1::2], format='%1.0f', orientation='horizontal', shrink=.35, aspect=30, pad=.4)
|
|
1202
|
+ cb2.ax.tick_params(axis='both', which='major', labelsize=fs)
|
|
1203
|
+
|
|
1204
|
+ if phase == 0: # Re Im
|
|
1205
|
+ cb1.set_label(r"$\mathrm{Re} \left( \mathcal{V}_N \right)$ (nV)", fontsize=fs)
|
|
1206
|
+ cb2.set_label(r"$\mathrm{Im} \left( \mathcal{V}_N \right)$ (nV)", fontsize=fs)
|
|
1207
|
+ elif phase == 1: # Amp phase
|
|
1208
|
+ cb1.set_label(r"$\left| \mathcal{V}_N \right|$ (nV)", fontsize=fs)
|
|
1209
|
+ cb2.set_label(r"$\angle \mathcal{V}_N$", fontsize=fs)
|
1190
|
1210
|
else:
|
1191
|
|
- cb2.set_label("$\mathcal{V}_N$ (nV)", fontsize=8)
|
|
1211
|
+ cb1.set_label(r"$\left| \mathcal{V}_N \right|$ (nV)", fontsize=fs)
|
|
1212
|
+ cb2.set_label(r"noise (nV)", fontsize=fs)
|
1192
|
1213
|
|
1193
|
1214
|
|
1194
|
1215
|
cb2.locator = tick_locator2
|
1195
|
1216
|
cb2.update_ticks()
|
1196
|
1217
|
|
|
1218
|
+ #canvas.fig.tight_layout()
|
1197
|
1219
|
canvas.draw()
|
1198
|
1220
|
self.doneTrigger.emit()
|
1199
|
1221
|
|
|
@@ -1341,7 +1363,9 @@ class GMRDataProcessor(SNMRDataProcessor):
|
1341
|
1363
|
def plotGateIntegrate( self, gpd, clip, phase, canvas ):
|
1342
|
1364
|
""" Plot the gate integration
|
1343
|
1365
|
"""
|
1344
|
|
-
|
|
1366
|
+
|
|
1367
|
+ fs = 10
|
|
1368
|
+
|
1345
|
1369
|
canvas.reAxH2( len(self.DATADICT[ self.DATADICT["PULSES"][0] ]["chan"] ), False, False)
|
1346
|
1370
|
axes = canvas.fig.axes
|
1347
|
1371
|
#cmap = cmocean.cm.balance_r
|
|
@@ -1454,34 +1478,34 @@ class GMRDataProcessor(SNMRDataProcessor):
|
1454
|
1478
|
ax2.xaxis.set_major_formatter(formatter) #matplotlib.ticker.FormatStrFormatter('%d.1'))
|
1455
|
1479
|
|
1456
|
1480
|
if ichan == 0:
|
1457
|
|
- ax1.set_ylabel(r"$q$ ( $\mathrm{A}\cdot\mathrm{s}$)", fontsize=8)
|
|
1481
|
+ ax1.set_ylabel(r"$q$ ( $\mathrm{A}\cdot\mathrm{s}$)", fontsize=fs)
|
1458
|
1482
|
if phase == 2:
|
1459
|
|
- ax2.set_ylabel(r"noise est. (nV)", fontsize=8)
|
|
1483
|
+ ax2.set_ylabel(r"noise est. (nV)", fontsize=fs)
|
1460
|
1484
|
else:
|
1461
|
|
- ax2.set_ylabel(r"$q$ ( $\mathrm{A}\cdot\mathrm{s}$)", fontsize=8)
|
|
1485
|
+ ax2.set_ylabel(r"$q$ ( $\mathrm{A}\cdot\mathrm{s}$)", fontsize=fs)
|
1462
|
1486
|
else:
|
1463
|
1487
|
plt.setp(ax1.get_yticklabels(), visible=False)
|
1464
|
1488
|
plt.setp(ax2.get_yticklabels(), visible=False)
|
1465
|
1489
|
|
1466
|
|
- ax2.set_xlabel(r"$t-\tau_p$ (ms)", fontsize=8)
|
|
1490
|
+ ax2.set_xlabel(r"$t-\tau_p$ (ms)", fontsize=fs)
|
1467
|
1491
|
ichan += 1
|
1468
|
1492
|
|
1469
|
1493
|
#canvas.fig.subplots_adjust(hspace=.1, wspace=.05, left=.075, right=.925 )#left=None, bottom=None, right=None, top=None, wspace=None, hspace=None)
|
1470
|
1494
|
#canvas.fig.tight_layout()
|
1471
|
1495
|
#canvas.draw()
|
1472
|
|
- canvas.fig.subplots_adjust(hspace=.15, wspace=.05, left=.075, right=.95, bottom=.1, top=.95 )#left=None, bottom=None, right=None, top=None, wspace=None, hspace=None)
|
|
1496
|
+ canvas.fig.subplots_adjust(hspace=.15, wspace=.05, left=.15, right=.9, bottom=.1, top=.9 )#left=None, bottom=None, right=None, top=None, wspace=None, hspace=None)
|
1473
|
1497
|
tick_locator = MaxNLocator(nbins=5)
|
1474
|
1498
|
|
1475
|
|
- cb1 = canvas.fig.colorbar(im1, ax=axes[0::2], format='%1.0e', orientation='horizontal', shrink=.35, aspect=30)
|
1476
|
|
- cb1.ax.tick_params(axis='both', which='major', labelsize=8)
|
1477
|
|
- cb1.set_label("$\mathcal{V}_N$ (nV)", fontsize=8)
|
|
1499
|
+ cb1 = canvas.fig.colorbar(im1, ax=axes[0::2], format='%1.0f', orientation='horizontal', shrink=.35, aspect=30)
|
|
1500
|
+ cb1.ax.tick_params(axis='both', which='major', labelsize=fs)
|
|
1501
|
+ cb1.set_label("$\mathcal{V}_N$ (nV)", fontsize=fs)
|
1478
|
1502
|
#cb1.locator = tick_locator
|
1479
|
1503
|
#cb1.update_ticks()
|
1480
|
1504
|
|
1481
|
1505
|
if phase != 2:
|
1482
|
|
- cb2 = canvas.fig.colorbar(im2, ax=axes[1::2], format='%1.0e', orientation='horizontal', shrink=.35, aspect=30, pad=.2)
|
1483
|
|
- cb2.ax.tick_params(axis='both', which='major', labelsize=8)
|
1484
|
|
- cb2.set_label("$\mathcal{V}_N$ (nV)", fontsize=8)
|
|
1506
|
+ cb2 = canvas.fig.colorbar(im2, ax=axes[1::2], format='%1.0f', orientation='horizontal', shrink=.35, aspect=30, pad=.2)
|
|
1507
|
+ cb2.ax.tick_params(axis='both', which='major', labelsize=fs)
|
|
1508
|
+ cb2.set_label("$\mathcal{V}_N$ (nV)", fontsize=fs)
|
1485
|
1509
|
|
1486
|
1510
|
cb2.locator = tick_locator
|
1487
|
1511
|
cb2.update_ticks()
|
|
@@ -1652,20 +1676,22 @@ class GMRDataProcessor(SNMRDataProcessor):
|
1652
|
1676
|
self.DATADICT[pulse]["qeff"][ipm][istack] = qeff
|
1653
|
1677
|
self.DATADICT[pulse]["q_nu"][ipm][istack] = v
|
1654
|
1678
|
iistack += 1
|
1655
|
|
-
|
1656
|
|
- canvas.ax1.set_xlabel("time (ms)", fontsize=8)
|
1657
|
|
- canvas.ax1.set_ylabel("current (A)", fontsize=8)
|
1658
|
|
- canvas.draw()
|
1659
|
|
-
|
|
1679
|
+ #canvas.draw()
|
1660
|
1680
|
|
1661
|
1681
|
percent = int(1e2* (float)((istack)+ipm*self.DATADICT["nPulseMoments"]) /
|
1662
|
1682
|
(float)(len(self.DATADICT["PULSES"])*self.DATADICT["nPulseMoments"]*nstack))
|
1663
|
1683
|
self.progressTrigger.emit(percent)
|
1664
|
1684
|
|
1665
|
|
- canvas.draw()
|
1666
|
|
-
|
|
1685
|
+ canvas.ax1.set_xlabel("time (ms)", fontsize=10)
|
|
1686
|
+ canvas.ax1.set_ylabel("current (A)", fontsize=10)
|
|
1687
|
+ #canvas.draw()
|
1667
|
1688
|
|
1668
|
1689
|
self.plotQeffNu(cv, canvas.ax2)
|
|
1690
|
+
|
|
1691
|
+ deSpine(canvas.ax1)
|
|
1692
|
+ deSpine(canvas.ax2)
|
|
1693
|
+
|
|
1694
|
+ canvas.fig.tight_layout()
|
1669
|
1695
|
canvas.draw()
|
1670
|
1696
|
self.doneTrigger.emit()
|
1671
|
1697
|
|
|
@@ -1700,11 +1726,11 @@ class GMRDataProcessor(SNMRDataProcessor):
|
1700
|
1726
|
self.progressTrigger.emit(percent)
|
1701
|
1727
|
istack += 1
|
1702
|
1728
|
iFID += 1
|
1703
|
|
- ax.set_xlabel(r"pulse moment index", fontsize=8)
|
1704
|
|
- ax.set_ylabel(r"$q_{eff}$ [A$\cdot$sec]", fontsize=8)
|
|
1729
|
+ ax.set_xlabel(r"pulse moment index", fontsize=10)
|
|
1730
|
+ ax.set_ylabel(r"$q_{eff}$ (A$\cdot$sec)", fontsize=10)
|
1705
|
1731
|
ax.set_yscale('log')
|
1706
|
1732
|
ax.set_xlim(0, ax.get_xlim()[1])
|
1707
|
|
- ax.legend(loc='upper right', scatterpoints = 1, prop={'size':6})
|
|
1733
|
+ ax.legend(loc='upper right', scatterpoints = 1, prop={'size':10})
|
1708
|
1734
|
|
1709
|
1735
|
def enableDSP(self):
|
1710
|
1736
|
self.enableDSPTrigger.emit()
|
|
@@ -1800,19 +1826,24 @@ class GMRDataProcessor(SNMRDataProcessor):
|
1800
|
1826
|
self.DATADICT[pulse][ichan][ipm][istack] = e[::-1]
|
1801
|
1827
|
|
1802
|
1828
|
|
1803
|
|
- canvas.ax1.plot( H[pulse][ichan].reshape(-1, len(RX)) ) # , label="taps")
|
|
1829
|
+ #canvas.ax1.plot( H[pulse][ichan].reshape(-1, len(RX)) ) # , label="taps")
|
|
1830
|
+ canvas.ax1.plot( H[pulse][ichan][::-1].reshape(M, len(RX), order='F' ) ) #.reshape(-1, len(RX)) ) # , label="taps")
|
1804
|
1831
|
|
1805
|
|
- canvas.ax2.legend(prop={'size':6}, loc='upper right')
|
|
1832
|
+ canvas.ax2.legend(prop={'size':10}, loc='upper right')
|
1806
|
1833
|
#canvas.ax2.legend(prop={'size':6}, loc='upper right')
|
1807
|
1834
|
|
1808
|
1835
|
mh = np.max(np.abs( H[pulse][ichan] ))
|
1809
|
1836
|
canvas.ax1.set_ylim( -mh, mh )
|
1810
|
1837
|
|
1811
|
|
- canvas.ax2.set_xlabel(r"time [s]", fontsize=8)
|
1812
|
|
- canvas.ax2.set_ylabel(r"signal [nV]", fontsize=8)
|
|
1838
|
+ canvas.ax2.set_xlabel(r"time (s)", fontsize=10)
|
|
1839
|
+ canvas.ax2.set_ylabel(r"signal (nV)", fontsize=10)
|
|
1840
|
+
|
|
1841
|
+ canvas.ax1.set_xlabel(r"filter tap index", fontsize=10)
|
|
1842
|
+ canvas.ax1.set_ylabel(r"tap amplitude", fontsize=10)
|
1813
|
1843
|
|
1814
|
|
- canvas.ax1.set_xlabel(r"filter index", fontsize=8)
|
1815
|
|
- canvas.ax1.set_ylabel(r"scale factor", fontsize=8)
|
|
1844
|
+ canvas.fig.tight_layout()
|
|
1845
|
+ deSpine(canvas.ax1)
|
|
1846
|
+ deSpine(canvas.ax2)
|
1816
|
1847
|
|
1817
|
1848
|
canvas.draw()
|
1818
|
1849
|
|
|
@@ -2127,10 +2158,11 @@ class GMRDataProcessor(SNMRDataProcessor):
|
2127
|
2158
|
"""
|
2128
|
2159
|
|
2129
|
2160
|
if plot:
|
|
2161
|
+ fs = 10
|
2130
|
2162
|
canvas.reAx2()
|
2131
|
|
- canvas.ax1.set_ylabel(r"signal [nV]", fontsize=8)
|
2132
|
|
- canvas.ax2.set_xlabel(r"time [s]", fontsize=8)
|
2133
|
|
- canvas.ax2.set_ylabel(r"signal [nV]", fontsize=8)
|
|
2163
|
+ canvas.ax1.set_ylabel(r"signal (nV)", fontsize=fs)
|
|
2164
|
+ canvas.ax2.set_xlabel(r"time (s)", fontsize=fs)
|
|
2165
|
+ canvas.ax2.set_ylabel(r"signal (nV)", fontsize=fs)
|
2134
|
2166
|
|
2135
|
2167
|
self.samp /= dec
|
2136
|
2168
|
self.dt = 1./self.samp
|
|
@@ -2168,9 +2200,15 @@ class GMRDataProcessor(SNMRDataProcessor):
|
2168
|
2200
|
for ichan in self.DATADICT[pulse]["rchan"]:
|
2169
|
2201
|
canvas.ax1.plot( RSTIMES, 1e9*self.DATADICT[pulse][ichan][ipm][istack], \
|
2170
|
2202
|
label = pulse + " ipm=" + str(ipm) + " istack=" + str(istack) + " ichan=" + str(ichan))
|
2171
|
|
- canvas.ax1.legend(prop={'size':6}, loc='upper right')
|
2172
|
|
- canvas.ax2.legend(prop={'size':6}, loc='upper right')
|
|
2203
|
+ canvas.ax1.legend(prop={'size':fs}, loc='upper right')
|
|
2204
|
+ canvas.ax2.legend(prop={'size':fs}, loc='upper right')
|
|
2205
|
+
|
|
2206
|
+ deSpine( canvas.ax1 )
|
|
2207
|
+ deSpine( canvas.ax2 )
|
|
2208
|
+ plt.setp(canvas.ax1.get_xticklabels(), visible=False)
|
|
2209
|
+ canvas.fig.tight_layout()
|
2173
|
2210
|
canvas.draw()
|
|
2211
|
+
|
2174
|
2212
|
percent = (int)(1e2*((float)(iFID*self.DATADICT["nPulseMoments"]+(ipm))/( len(self.DATADICT["PULSES"])*self.nPulseMoments)))
|
2175
|
2213
|
self.progressTrigger.emit(percent)
|
2176
|
2214
|
iFID += 1
|
|
@@ -2569,19 +2607,24 @@ class GMRDataProcessor(SNMRDataProcessor):
|
2569
|
2607
|
for ichan in rchan:
|
2570
|
2608
|
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')
|
2571
|
2609
|
|
2572
|
|
- canvas.ax3.legend(prop={'size':6}, loc='upper right')
|
2573
|
|
- canvas.ax2.legend(prop={'size':6}, loc='upper right')
|
|
2610
|
+ # reference axis
|
|
2611
|
+ canvas.ax2.tick_params(axis='both', which='major', labelsize=10)
|
|
2612
|
+ canvas.ax2.tick_params(axis='both', which='minor', labelsize=10)
|
|
2613
|
+ #canvas.ax2.xaxis.set_ticklabels([])
|
|
2614
|
+ plt.setp(canvas.ax2.get_xticklabels(), visible=False)
|
|
2615
|
+ canvas.ax2.legend(prop={'size':10}, loc='upper right')
|
|
2616
|
+ canvas.ax2.set_title("stack "+str(istack)+" pulse index " + str(ipm), fontsize=10)
|
|
2617
|
+ canvas.ax2.set_ylabel("RAW signal [V]", fontsize=10)
|
2574
|
2618
|
|
2575
|
|
- canvas.ax1.set_ylabel("Current [A]", fontsize=8)
|
|
2619
|
+
|
|
2620
|
+ canvas.ax1.set_ylabel("Current (A)", fontsize=10)
|
2576
|
2621
|
canvas.ax1.ticklabel_format(style='sci', scilimits=(0,0), axis='y')
|
2577
|
|
- canvas.ax1.set_xlabel("time [s]", fontsize=8)
|
2578
|
|
-
|
2579
|
|
- canvas.ax2.set_title("stack "+str(istack)+" pulse index " + str(ipm), fontsize=8)
|
2580
|
|
- canvas.ax2.set_ylabel("RAW signal [V]", fontsize=8)
|
2581
|
|
- canvas.ax3.set_ylabel("RAW signal [V]", fontsize=8)
|
2582
|
|
- canvas.ax2.tick_params(axis='both', which='major', labelsize=8)
|
2583
|
|
- canvas.ax2.tick_params(axis='both', which='minor', labelsize=6)
|
|
2622
|
+ canvas.ax1.set_xlabel("time (s)", fontsize=10)
|
2584
|
2623
|
|
|
2624
|
+ canvas.ax3.legend(prop={'size':10}, loc='upper right')
|
|
2625
|
+ canvas.ax3.set_ylabel("RAW signal [V]", fontsize=10)
|
|
2626
|
+
|
|
2627
|
+ canvas.fig.tight_layout()
|
2585
|
2628
|
canvas.draw()
|
2586
|
2629
|
|
2587
|
2630
|
percent = (int) (1e2*((float)((iistack*self.nPulseMoments+ipm+1)) / (len(procStacks)*self.nPulseMoments)))
|