|
@@ -363,7 +363,7 @@ class GMRDataProcessor(SNMRDataProcessor):
|
363
|
363
|
ax1.set_xlabel(r"time (ms)", fontsize=8)
|
364
|
364
|
|
365
|
365
|
if ichan == 0:
|
366
|
|
- ax1.set_ylabel(r"signal [nV]", fontsize=8)
|
|
366
|
+ ax1.set_ylabel(r"signal (nV)", fontsize=8)
|
367
|
367
|
else:
|
368
|
368
|
plt.setp(ax1.get_yticklabels(), visible=False)
|
369
|
369
|
plt.setp(ax1.get_yaxis().get_offset_text(), visible=False)
|
|
@@ -499,7 +499,9 @@ class GMRDataProcessor(SNMRDataProcessor):
|
499
|
499
|
#im2.append(ax2.matshow( db, aspect='auto', vmin=vvmin, vmax=vvmax))
|
500
|
500
|
#im2 = ax2.matshow( db, aspect='auto', cmap=cmocean.cm.ice, vmin=vvmin, vmax=vvmax)
|
501
|
501
|
if ichan == 0:
|
502
|
|
- ax2.set_ylabel(r"$q$ (A $\cdot$ s)", fontsize=8)
|
|
502
|
+ #ax2.set_ylabel(r"$q$ (A $\cdot$ s)", fontsize=8)
|
|
503
|
+ ax2.set_ylabel(r"pulse index", fontsize=8)
|
|
504
|
+ #ax1.set_ylabel(r"FID (nV)", fontsize=8)
|
503
|
505
|
else:
|
504
|
506
|
#ax2.yaxis.set_ticklabels([])
|
505
|
507
|
plt.setp(ax2.get_yticklabels(), visible=False)
|
|
@@ -1084,8 +1086,8 @@ class GMRDataProcessor(SNMRDataProcessor):
|
1084
|
1086
|
ax1 = axes[2*ichan ]
|
1085
|
1087
|
ax2 = axes[2*ichan+1] # TODO fix hard coded number
|
1086
|
1088
|
if phase == 0: # Re Im
|
1087
|
|
- print("plot dog", np.shape(QQ), np.shape(self.DATADICT["RE"][pulse][chan]))
|
1088
|
|
- print("QQ", QQ)
|
|
1089
|
+ #print("plot dog", np.shape(QQ), np.shape(self.DATADICT["RE"][pulse][chan]))
|
|
1090
|
+ #print("QQ", QQ)
|
1089
|
1091
|
im1 = ax1.pcolormesh( time_sp, QQ[iQ], self.DATADICT["RE"][pulse][chan][iQ], cmap=dcmap, \
|
1090
|
1092
|
vmin=-self.DATADICT["REmax"][pulse] , vmax=self.DATADICT["REmax"][pulse] )
|
1091
|
1093
|
im2 = ax2.pcolormesh( time_sp, QQ[iQ], self.DATADICT["IM"][pulse][chan][iQ], cmap=dcmap, \
|
|
@@ -1575,7 +1577,7 @@ class GMRDataProcessor(SNMRDataProcessor):
|
1575
|
1577
|
|
1576
|
1578
|
canvas.reAxH(2)
|
1577
|
1579
|
nstack = len(self.DATADICT["stacks"])
|
1578
|
|
- canvas.ax1.set_yscale('log')
|
|
1580
|
+ #canvas.ax1.set_yscale('log')
|
1579
|
1581
|
|
1580
|
1582
|
for pulse in self.DATADICT["PULSES"]:
|
1581
|
1583
|
self.DATADICT[pulse]["qeff"] = {}
|
|
@@ -1600,17 +1602,28 @@ class GMRDataProcessor(SNMRDataProcessor):
|
1600
|
1602
|
v = np.fft.fftfreq(len(x), self.dt)
|
1601
|
1603
|
v = v[0:len(X)]
|
1602
|
1604
|
v[-1] = np.abs(v[-1])
|
|
1605
|
+
|
1603
|
1606
|
# calculate effective current/moment
|
1604
|
1607
|
I0 = np.abs(X)/len(X)
|
1605
|
|
- qeff = I0 * (self.DATADICT[pulse]["PULSE_TIMES"][-1]-self.DATADICT[pulse]["PULSE_TIMES"][0])
|
1606
|
|
- canvas.ax1.set_title(r"pulse moment index " +str(ipm), fontsize=10)
|
1607
|
|
- canvas.ax1.set_xlabel(r"$\nu$ [Hz]", fontsize=8)
|
1608
|
|
- canvas.ax1.set_ylabel(r"$q_{eff}$ [A$\cdot$sec]", fontsize=8)
|
1609
|
|
- canvas.ax1.plot(v, qeff, color=scolours[iistack] ) # eff current
|
|
1608
|
+ qeff = I0 #* (self.DATADICT[pulse]["PULSE_TIMES"][-1]-self.DATADICT[pulse]["PULSE_TIMES"][0])
|
|
1609
|
+
|
|
1610
|
+ # frequency plot
|
|
1611
|
+ #canvas.ax1.set_title(r"pulse moment index " +str(ipm), fontsize=10)
|
|
1612
|
+ #canvas.ax1.set_xlabel(r"$\nu$ [Hz]", fontsize=8)
|
|
1613
|
+ #canvas.ax1.set_ylabel(r"$q_{eff}$ [A$\cdot$sec]", fontsize=8)
|
|
1614
|
+ #canvas.ax1.plot(v, qeff, color=scolours[iistack] ) # eff current
|
|
1615
|
+
|
|
1616
|
+ # time plot
|
|
1617
|
+ canvas.ax1.plot(1e2*(self.DATADICT[pulse]["PULSE_TIMES"]-self.DATADICT[pulse]["PULSE_TIMES"][0]), x, color=scolours[iistack])
|
|
1618
|
+
|
1610
|
1619
|
self.DATADICT[pulse]["qeff"][ipm][istack] = qeff
|
1611
|
1620
|
self.DATADICT[pulse]["q_nu"][ipm][istack] = v
|
1612
|
1621
|
iistack += 1
|
|
1622
|
+
|
|
1623
|
+ canvas.ax1.set_xlabel("time (ms)", fontsize=8)
|
|
1624
|
+ canvas.ax1.set_ylabel("current (A)", fontsize=8)
|
1613
|
1625
|
canvas.draw()
|
|
1626
|
+
|
1614
|
1627
|
|
1615
|
1628
|
percent = int(1e2* (float)((istack)+ipm*self.DATADICT["nPulseMoments"]) /
|
1616
|
1629
|
(float)(len(self.DATADICT["PULSES"])*self.DATADICT["nPulseMoments"]*nstack))
|
|
@@ -1640,7 +1653,7 @@ class GMRDataProcessor(SNMRDataProcessor):
|
1640
|
1653
|
istack = 0
|
1641
|
1654
|
for stack in self.DATADICT["stacks"]:
|
1642
|
1655
|
# find index
|
1643
|
|
- icv = int (round(cv / self.DATADICT[pulse]["q_nu"][ipm][stack][1]))
|
|
1656
|
+ icv = int(round(cv / self.DATADICT[pulse]["q_nu"][ipm][stack][1]))
|
1644
|
1657
|
self.DATADICT[pulse]["Q"][ipm,istack] = self.DATADICT[pulse]["qeff"][ipm][stack][icv]
|
1645
|
1658
|
if ilabel:
|
1646
|
1659
|
ax.scatter(ipm, self.DATADICT[pulse]["qeff"][ipm][stack][icv], facecolors='none', edgecolors=scolours[istack], label=(str(pulse)))
|