|
@@ -337,7 +337,7 @@ class GMRDataProcessor(SNMRDataProcessor):
|
337
|
337
|
y_formatter = matplotlib.ticker.ScalarFormatter(useOffset=False)
|
338
|
338
|
ax1.yaxis.set_major_formatter(y_formatter)
|
339
|
339
|
|
340
|
|
- ax1.plot( 1e3*self.DATADICT[pulse]["TIMES"], np.average( SimpleStack[pulse][chan], 0 ), color='darkblue' )
|
|
340
|
+ ax1.plot( 1e3*self.DATADICT[pulse]["TIMES"], np.average( SimpleStack[pulse][chan], 0 ))
|
341
|
341
|
ax1.set_title("Ch." + str(chan) + ": avg FID", fontsize=8)
|
342
|
342
|
ax1.set_xlabel(r"time (ms)", fontsize=8)
|
343
|
343
|
|
|
@@ -408,7 +408,7 @@ class GMRDataProcessor(SNMRDataProcessor):
|
408
|
408
|
(float)(self.DATADICT["nPulseMoments"] * len(self.DATADICT[pulse]["chan"])))
|
409
|
409
|
self.progressTrigger.emit(percent)
|
410
|
410
|
|
411
|
|
- ax1.plot( 1e3*self.DATADICT[pulse]["TIMES"], np.average( madstack[ichan], 0 ) , color='darkred')
|
|
411
|
+ ax1.plot( 1e3*self.DATADICT[pulse]["TIMES"], np.average( madstack[ichan], 0 ))
|
412
|
412
|
|
413
|
413
|
MADStack[pulse][chan] = madstack[ichan]
|
414
|
414
|
VarStack[pulse][chan] = varstack[ichan]
|
|
@@ -427,6 +427,7 @@ class GMRDataProcessor(SNMRDataProcessor):
|
427
|
427
|
|
428
|
428
|
|
429
|
429
|
im2 = []
|
|
430
|
+ im1 = []
|
430
|
431
|
for pulse in self.DATADICT["PULSES"]:
|
431
|
432
|
ichan = 0
|
432
|
433
|
axes = canvas.fig.axes
|
|
@@ -447,8 +448,8 @@ class GMRDataProcessor(SNMRDataProcessor):
|
447
|
448
|
df = nu[1] - nu[0]
|
448
|
449
|
of = 0
|
449
|
450
|
|
450
|
|
- istart = int((self.transFreq-150.)/df)
|
451
|
|
- iend = int((self.transFreq+150.)/df)
|
|
451
|
+ istart = int((self.transFreq-50.)/df)
|
|
452
|
+ iend = int((self.transFreq+50.)/df)
|
452
|
453
|
of = nu[istart]
|
453
|
454
|
|
454
|
455
|
def freqlabel(xxx, pos):
|
|
@@ -466,10 +467,15 @@ class GMRDataProcessor(SNMRDataProcessor):
|
466
|
467
|
|
467
|
468
|
|
468
|
469
|
db = (np.abs(SFFT[:,istart:iend]))
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
|
469
|
473
|
|
470
|
474
|
vvmin = min(vvmin, np.min (db))
|
471
|
475
|
vvmax = max(vvmax, np.max (db))
|
472
|
476
|
im2.append(ax2.matshow( db, aspect='auto', cmap=cmocean.cm.ice, vmin=vvmin, vmax=vvmax))
|
|
477
|
+
|
|
478
|
+
|
473
|
479
|
|
474
|
480
|
if ichan == 0:
|
475
|
481
|
ax2.set_ylabel(r"$q$ (A $\cdot$ s)", fontsize=8)
|
|
@@ -510,6 +516,227 @@ class GMRDataProcessor(SNMRDataProcessor):
|
510
|
516
|
canvas.draw()
|
511
|
517
|
self.doneTrigger.emit()
|
512
|
518
|
|
|
519
|
+ def FDSmartStack(self, outlierTest, MADcutoff, canvas):
|
|
520
|
+
|
|
521
|
+ print("FFT stuff")
|
|
522
|
+ self.dataCubeFFT()
|
|
523
|
+
|
|
524
|
+ Stack = {}
|
|
525
|
+
|
|
526
|
+ for pulse in self.DATADICT["PULSES"]:
|
|
527
|
+ stack = np.zeros(( len(self.DATADICT[pulse]["chan"]), \
|
|
528
|
+ self.DATADICT["nPulseMoments"],\
|
|
529
|
+ len(self.DATADICT["stacks"]),\
|
|
530
|
+ len(self.DATADICT[pulse][self.DATADICT[pulse]["chan"][0] ]["FFT"]["nu"])//2 + 1),\
|
|
531
|
+ dtype=np.complex )
|
|
532
|
+ for ipm in range(self.DATADICT["nPulseMoments"]):
|
|
533
|
+ istack = 0
|
|
534
|
+ for sstack in self.DATADICT["stacks"]:
|
|
535
|
+ if self.pulseType == "FID" or pulse == "Pulse 2":
|
|
536
|
+ mod = (-1)**(ipm%2) * (-1)**(sstack%2)
|
|
537
|
+ elif self.pulseType == "4PhaseT1":
|
|
538
|
+ mod = (-1)**(ipm%2) * (-1)**(((sstack-1)/2)%2)
|
|
539
|
+ ichan = 0
|
|
540
|
+ for chan in self.DATADICT[pulse]["chan"]:
|
|
541
|
+
|
|
542
|
+ stack[ichan,ipm,istack,:] += mod*self.DATADICT[pulse][chan]["FFT"][sstack][ipm,:]
|
|
543
|
+ ichan += 1
|
|
544
|
+ istack += 1
|
|
545
|
+ Stack[pulse] = stack
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
|
|
549
|
+
|
|
550
|
+ canvas.reAxH2(np.shape(stack)[0], False, False)
|
|
551
|
+ axes = canvas.fig.axes
|
|
552
|
+ SimpleStack = {}
|
|
553
|
+ VarStack = {}
|
|
554
|
+ for pulse in self.DATADICT["PULSES"]:
|
|
555
|
+ SimpleStack[pulse] = {}
|
|
556
|
+ VarStack[pulse] = {}
|
|
557
|
+ ichan = 0
|
|
558
|
+ for chan in self.DATADICT[pulse]["chan"]:
|
|
559
|
+ SimpleStack[pulse][chan] = 1e9*np.average( Stack[pulse][ichan], 1 )
|
|
560
|
+ VarStack[pulse][chan] = 1e9*np.std( Stack[pulse][ichan], 1 )
|
|
561
|
+ ax1 = axes[ 2*ichan ]
|
|
562
|
+
|
|
563
|
+
|
|
564
|
+ y_formatter = matplotlib.ticker.ScalarFormatter(useOffset=False)
|
|
565
|
+ ax1.yaxis.set_major_formatter(y_formatter)
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+ ax1.matshow( np.real(SimpleStack[pulse][chan]), aspect='auto')
|
|
570
|
+ ax1.set_title("Ch." + str(chan) + ": avg FID", fontsize=8)
|
|
571
|
+ ax1.set_xlabel(r"time (ms)", fontsize=8)
|
|
572
|
+
|
|
573
|
+ if ichan == 0:
|
|
574
|
+ ax1.set_ylabel(r"signal [nV]", fontsize=8)
|
|
575
|
+ else:
|
|
576
|
+ plt.setp(ax1.get_yticklabels(), visible=False)
|
|
577
|
+ plt.setp(ax1.get_yaxis().get_offset_text(), visible=False)
|
|
578
|
+ ichan += 1
|
|
579
|
+
|
|
580
|
+
|
|
581
|
+
|
|
582
|
+
|
|
583
|
+ if outlierTest == "MAD":
|
|
584
|
+ MADStack = {}
|
|
585
|
+ VarStack = {}
|
|
586
|
+
|
|
587
|
+ madstack = np.zeros(( len(self.DATADICT[pulse]["chan"]),\
|
|
588
|
+ self.DATADICT["nPulseMoments"],\
|
|
589
|
+ len(self.DATADICT[pulse][self.DATADICT[pulse]["chan"][0] ]["FFT"]["nu"])//2 + 1))
|
|
590
|
+ varstack = np.zeros(( len(self.DATADICT[pulse]["chan"]),\
|
|
591
|
+ self.DATADICT["nPulseMoments"],\
|
|
592
|
+ len(self.DATADICT[pulse][self.DATADICT[pulse]["chan"][0] ]["FFT"]["nu"])//2 + 1))
|
|
593
|
+ for pulse in self.DATADICT["PULSES"]:
|
|
594
|
+ MADStack[pulse] = {}
|
|
595
|
+ VarStack[pulse] = {}
|
|
596
|
+ ichan = 0
|
|
597
|
+ for chan in self.DATADICT[pulse]["chan"]:
|
|
598
|
+ ax1 = axes[ 2*ichan ]
|
|
599
|
+ for ipm in range(self.DATADICT["nPulseMoments"]):
|
|
600
|
+
|
|
601
|
+
|
|
602
|
+
|
|
603
|
+
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
|
|
607
|
+
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
|
|
612
|
+
|
|
613
|
+
|
|
614
|
+
|
|
615
|
+
|
|
616
|
+ x = 1e9*copy.deepcopy(Stack[pulse][ichan][ipm,:,:])
|
|
617
|
+ tile_med = np.tile( np.median(x, axis=0), (np.shape(x)[0],1))
|
|
618
|
+ MAD = MADcutoff * np.median(np.abs(x - tile_med), axis=0)
|
|
619
|
+ tile_MAD = np.tile( MAD, (np.shape(x)[0],1))
|
|
620
|
+ good = np.abs(x-tile_med)/tile_MAD < 2.
|
|
621
|
+
|
|
622
|
+ madstack[ichan][ipm] = copy.deepcopy( np.ma.masked_array(x, good != True).mean(axis=0) )
|
|
623
|
+ varstack[ichan][ipm] = copy.deepcopy( np.ma.masked_array(x, good != True).std(axis=0) )
|
|
624
|
+
|
|
625
|
+
|
|
626
|
+ percent = int(1e2* (float)((ipm)+ichan*self.DATADICT["nPulseMoments"]) /
|
|
627
|
+ (float)(self.DATADICT["nPulseMoments"] * len(self.DATADICT[pulse]["chan"])))
|
|
628
|
+ self.progressTrigger.emit(percent)
|
|
629
|
+
|
|
630
|
+ ax2 = axes[2*ichan+1]
|
|
631
|
+
|
|
632
|
+ MADStack[pulse][chan] = madstack[ichan]
|
|
633
|
+ VarStack[pulse][chan] = varstack[ichan]
|
|
634
|
+ ax2.matshow( np.real(MADStack[pulse][chan]), aspect='auto')
|
|
635
|
+ ichan += 1
|
|
636
|
+
|
|
637
|
+ self.DATADICT["stack"] = MADStack
|
|
638
|
+
|
|
639
|
+ else:
|
|
640
|
+ self.DATADICT["stack"] = SimpleStack
|
|
641
|
+
|
|
642
|
+
|
|
643
|
+
|
|
644
|
+
|
|
645
|
+
|
|
646
|
+
|
|
647
|
+
|
|
648
|
+
|
|
649
|
+
|
|
650
|
+
|
|
651
|
+
|
|
652
|
+
|
|
653
|
+
|
|
654
|
+
|
|
655
|
+
|
|
656
|
+
|
|
657
|
+
|
|
658
|
+
|
|
659
|
+
|
|
660
|
+
|
|
661
|
+
|
|
662
|
+
|
|
663
|
+
|
|
664
|
+
|
|
665
|
+
|
|
666
|
+
|
|
667
|
+
|
|
668
|
+
|
|
669
|
+
|
|
670
|
+
|
|
671
|
+
|
|
672
|
+
|
|
673
|
+
|
|
674
|
+
|
|
675
|
+
|
|
676
|
+
|
|
677
|
+
|
|
678
|
+
|
|
679
|
+
|
|
680
|
+
|
|
681
|
+
|
|
682
|
+
|
|
683
|
+
|
|
684
|
+
|
|
685
|
+
|
|
686
|
+
|
|
687
|
+
|
|
688
|
+
|
|
689
|
+
|
|
690
|
+
|
|
691
|
+
|
|
692
|
+
|
|
693
|
+
|
|
694
|
+
|
|
695
|
+
|
|
696
|
+
|
|
697
|
+
|
|
698
|
+
|
|
699
|
+
|
|
700
|
+
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
|
|
704
|
+
|
|
705
|
+
|
|
706
|
+
|
|
707
|
+
|
|
708
|
+
|
|
709
|
+
|
|
710
|
+
|
|
711
|
+
|
|
712
|
+
|
|
713
|
+
|
|
714
|
+
|
|
715
|
+
|
|
716
|
+
|
|
717
|
+
|
|
718
|
+
|
|
719
|
+
|
|
720
|
+
|
|
721
|
+
|
|
722
|
+
|
|
723
|
+
|
|
724
|
+
|
|
725
|
+
|
|
726
|
+
|
|
727
|
+
|
|
728
|
+
|
|
729
|
+
|
|
730
|
+
|
|
731
|
+
|
|
732
|
+
|
|
733
|
+
|
|
734
|
+
|
|
735
|
+
|
|
736
|
+ canvas.draw()
|
|
737
|
+ self.doneTrigger.emit()
|
|
738
|
+
|
|
739
|
+
|
513
|
740
|
def sumData(self, canvas, fred):
|
514
|
741
|
chans = copy.deepcopy(self.DATADICT[self.DATADICT["PULSES"][0]]["chan"])
|
515
|
742
|
nchan = len(chans)
|
|
@@ -522,24 +749,29 @@ class GMRDataProcessor(SNMRDataProcessor):
|
522
|
749
|
for ipm in range(self.DATADICT["nPulseMoments"]):
|
523
|
750
|
self.DATADICT[pulse][chsum][ipm] = {}
|
524
|
751
|
for istack in self.DATADICT["stacks"]:
|
525
|
|
- self.DATADICT[pulse][chsum][ipm][istack] = self.DATADICT[pulse][chans[ich]][ipm][istack] + self.DATADICT[pulse][ch][ipm][istack]
|
526
|
|
- self.DATADICT[pulse]["chan"].append(chsum)
|
|
752
|
+ self.DATADICT[pulse][chsum][ipm][istack] = self.DATADICT[pulse][chans[ich]][ipm][istack] - self.DATADICT[pulse][ch][ipm][istack]
|
|
753
|
+ if chsum == "1+2":
|
|
754
|
+
|
|
755
|
+
|
|
756
|
+ self.DATADICT[pulse]["chan"].append(chsum)
|
527
|
757
|
|
528
|
758
|
|
529
|
|
- chsum = ""
|
530
|
|
- for ch in chans:
|
531
|
|
- chsum += ch + "+"
|
532
|
|
- chsum = chsum[0:-1]
|
|
759
|
+ sumall = False
|
|
760
|
+ if sumall:
|
|
761
|
+ chsum = ""
|
|
762
|
+ for ch in chans:
|
|
763
|
+ chsum += ch + "+"
|
|
764
|
+ chsum = chsum[0:-1]
|
533
|
765
|
|
534
|
|
- for pulse in self.DATADICT["PULSES"]:
|
535
|
|
- self.DATADICT[pulse][chsum] = {}
|
536
|
|
- for ipm in range(self.DATADICT["nPulseMoments"]):
|
537
|
|
- self.DATADICT[pulse][chsum][ipm] = {}
|
538
|
|
- for istack in self.DATADICT["stacks"]:
|
539
|
|
- self.DATADICT[pulse][chsum][ipm][istack] = copy.deepcopy(self.DATADICT[pulse][chans[0]][ipm][istack])
|
540
|
|
- for ch in chans[1:]:
|
541
|
|
- self.DATADICT[pulse][chsum][ipm][istack] += self.DATADICT[pulse][ch][ipm][istack]
|
542
|
|
- self.DATADICT[pulse]["chan"].append(chsum)
|
|
766
|
+ for pulse in self.DATADICT["PULSES"]:
|
|
767
|
+ self.DATADICT[pulse][chsum] = {}
|
|
768
|
+ for ipm in range(self.DATADICT["nPulseMoments"]):
|
|
769
|
+ self.DATADICT[pulse][chsum][ipm] = {}
|
|
770
|
+ for istack in self.DATADICT["stacks"]:
|
|
771
|
+ self.DATADICT[pulse][chsum][ipm][istack] = copy.deepcopy(self.DATADICT[pulse][chans[0]][ipm][istack])
|
|
772
|
+ for ch in chans[1:]:
|
|
773
|
+ self.DATADICT[pulse][chsum][ipm][istack] += self.DATADICT[pulse][ch][ipm][istack]
|
|
774
|
+ self.DATADICT[pulse]["chan"].append(chsum)
|
543
|
775
|
|
544
|
776
|
|
545
|
777
|
|
|
@@ -611,9 +843,10 @@ class GMRDataProcessor(SNMRDataProcessor):
|
611
|
843
|
|
612
|
844
|
|
613
|
845
|
|
614
|
|
- [success, E0, df, phi, T2] = decay.quadratureDetect( ht.real, ht.imag, self.DATADICT[pulse]["TIMES"] )
|
|
846
|
+
|
615
|
847
|
|
616
|
|
-
|
|
848
|
+ [success, E0, df, phi, T2] = decay.quadratureDetect2( ht.real, ht.imag, self.DATADICT[pulse]["TIMES"])
|
|
849
|
+
|
617
|
850
|
|
618
|
851
|
|
619
|
852
|
|
|
@@ -649,7 +882,7 @@ class GMRDataProcessor(SNMRDataProcessor):
|
649
|
882
|
|
650
|
883
|
|
651
|
884
|
|
652
|
|
- dcmap = cmocean.cm.balance_r
|
|
885
|
+ dcmap = cmocean.cm.curl_r
|
653
|
886
|
canvas.reAxH2( len(self.DATADICT[ self.DATADICT["PULSES"][0] ]["chan"] ), False, False)
|
654
|
887
|
for pulse in self.DATADICT["PULSES"]:
|
655
|
888
|
ichan = 0
|
|
@@ -679,7 +912,7 @@ class GMRDataProcessor(SNMRDataProcessor):
|
679
|
912
|
if phase == 2:
|
680
|
913
|
im1 = ax1.pcolormesh( time_sp, QQ, self.DATADICT["CA"][pulse][chan], cmap=dcmap, rasterized=True,\
|
681
|
914
|
vmin=-self.DATADICT["CAmax"][pulse] , vmax=self.DATADICT["CAmax"][pulse] )
|
682
|
|
- im2 = ax2.pcolormesh( time_sp, QQ, self.DATADICT["NR"][pulse][chan], cmap=dcmap, rasterized=True,
|
|
915
|
+ im2 = ax2.pcolormesh( time_sp, QQ, self.DATADICT["NR"][pulse][chan], cmap=dcmap, rasterized=True,\
|
683
|
916
|
vmin=-self.DATADICT["NRmax"][pulse] , vmax=self.DATADICT["NRmax"][pulse] )
|
684
|
917
|
|
685
|
918
|
|
|
@@ -729,7 +962,7 @@ class GMRDataProcessor(SNMRDataProcessor):
|
729
|
962
|
ax2.set_xlabel(r"Time (ms)", fontsize=8)
|
730
|
963
|
|
731
|
964
|
canvas.fig.subplots_adjust(hspace=.15, wspace=.05, left=.075, right=.95, bottom=.1, top=.95 )
|
732
|
|
- tick_locator = MaxNLocator(nbins=5)
|
|
965
|
+ tick_locator = MaxNLocator(nbins=3)
|
733
|
966
|
|
734
|
967
|
cb1 = canvas.fig.colorbar(im1, ax=axes[0::2], format='%1.0e', orientation='horizontal', shrink=.35, aspect=30)
|
735
|
968
|
cb1.ax.tick_params(axis='both', which='major', labelsize=8)
|
|
@@ -737,12 +970,13 @@ class GMRDataProcessor(SNMRDataProcessor):
|
737
|
970
|
cb1.locator = tick_locator
|
738
|
971
|
cb1.update_ticks()
|
739
|
972
|
|
|
973
|
+ tick_locator2 = MaxNLocator(nbins=3)
|
740
|
974
|
cb2 = canvas.fig.colorbar(im2, ax=axes[1::2], format='%1.0e', orientation='horizontal', shrink=.35, aspect=30, pad=.2)
|
741
|
975
|
cb2.ax.tick_params(axis='both', which='major', labelsize=8)
|
742
|
976
|
cb2.set_label("$\mathcal{V}_N$ (nV)", fontsize=8)
|
743
|
977
|
|
744
|
978
|
|
745
|
|
- cb2.locator = tick_locator
|
|
979
|
+ cb2.locator = tick_locator2
|
746
|
980
|
cb2.update_ticks()
|
747
|
981
|
|
748
|
982
|
canvas.draw()
|
|
@@ -1131,7 +1365,7 @@ class GMRDataProcessor(SNMRDataProcessor):
|
1131
|
1365
|
|
1132
|
1366
|
canvas.reAxH(2)
|
1133
|
1367
|
nstack = len(self.DATADICT["stacks"])
|
1134
|
|
-
|
|
1368
|
+ canvas.ax1.set_yscale('log')
|
1135
|
1369
|
|
1136
|
1370
|
for pulse in self.DATADICT["PULSES"]:
|
1137
|
1371
|
self.DATADICT[pulse]["qeff"] = {}
|
|
@@ -1140,7 +1374,15 @@ class GMRDataProcessor(SNMRDataProcessor):
|
1140
|
1374
|
self.DATADICT[pulse]["qeff"][ipm] = {}
|
1141
|
1375
|
self.DATADICT[pulse]["q_nu"][ipm] = {}
|
1142
|
1376
|
|
1143
|
|
- scolours = np.array([0.,0.,1.])
|
|
1377
|
+
|
|
1378
|
+
|
|
1379
|
+
|
|
1380
|
+
|
|
1381
|
+
|
|
1382
|
+
|
|
1383
|
+
|
|
1384
|
+ scolours = cmocean.cm.ice(np.linspace(0,1,1.5*len(self.DATADICT["stacks"])))
|
|
1385
|
+ iistack = 0
|
1144
|
1386
|
for istack in self.DATADICT["stacks"]:
|
1145
|
1387
|
|
1146
|
1388
|
x = self.DATADICT[pulse]["CURRENT"][ipm][istack]
|
|
@@ -1154,12 +1396,10 @@ class GMRDataProcessor(SNMRDataProcessor):
|
1154
|
1396
|
canvas.ax1.set_title(r"pulse moment index " +str(ipm), fontsize=10)
|
1155
|
1397
|
canvas.ax1.set_xlabel(r"$\nu$ [Hz]", fontsize=8)
|
1156
|
1398
|
canvas.ax1.set_ylabel(r"$q_{eff}$ [A$\cdot$sec]", fontsize=8)
|
1157
|
|
- if nstack > 1:
|
1158
|
|
- canvas.ax1.plot(v, qeff, color=scolours+istack*np.array((0.,1./(nstack+1.),-1./(nstack+1.)) ))
|
1159
|
|
- else:
|
1160
|
|
- canvas.ax1.plot(v, qeff, color=scolours)
|
|
1399
|
+ canvas.ax1.plot(v, qeff, color=scolours[iistack] )
|
1161
|
1400
|
self.DATADICT[pulse]["qeff"][ipm][istack] = qeff
|
1162
|
1401
|
self.DATADICT[pulse]["q_nu"][ipm][istack] = v
|
|
1402
|
+ iistack += 1
|
1163
|
1403
|
canvas.draw()
|
1164
|
1404
|
|
1165
|
1405
|
percent = int(1e2* (float)((istack)+ipm*self.DATADICT["nPulseMoments"]) /
|
|
@@ -1177,25 +1417,27 @@ class GMRDataProcessor(SNMRDataProcessor):
|
1177
|
1417
|
|
1178
|
1418
|
|
1179
|
1419
|
|
1180
|
|
- scolours = ['blue','green']
|
1181
|
1420
|
nstack = len(self.DATADICT["stacks"])
|
1182
|
1421
|
iFID = 0
|
1183
|
1422
|
for pulse in self.DATADICT["PULSES"]:
|
1184
|
1423
|
self.DATADICT[pulse]["Q"] = np.zeros( (self.DATADICT["nPulseMoments"], len(self.DATADICT["stacks"])) )
|
1185
|
1424
|
ilabel = True
|
1186
|
1425
|
for ipm in range(self.DATADICT["nPulseMoments"]):
|
1187
|
|
- scolours = np.array([0.,0.,1.])
|
|
1426
|
+
|
|
1427
|
+ scolours = cmocean.cm.ice(np.linspace(0,1,1.5*len(self.DATADICT["stacks"])))
|
|
1428
|
+
|
|
1429
|
+
|
1188
|
1430
|
istack = 0
|
1189
|
1431
|
for stack in self.DATADICT["stacks"]:
|
1190
|
1432
|
|
1191
|
1433
|
icv = int (round(cv / self.DATADICT[pulse]["q_nu"][ipm][stack][1]))
|
1192
|
1434
|
self.DATADICT[pulse]["Q"][ipm,istack] = self.DATADICT[pulse]["qeff"][ipm][stack][icv]
|
1193
|
1435
|
if ilabel:
|
1194
|
|
- ax.scatter(ipm, self.DATADICT[pulse]["qeff"][ipm][stack][icv], facecolors='none', edgecolors=scolours, label=(str(pulse)))
|
|
1436
|
+ ax.scatter(ipm, self.DATADICT[pulse]["qeff"][ipm][stack][icv], facecolors='none', edgecolors=scolours[istack], label=(str(pulse)))
|
1195
|
1437
|
ilabel = False
|
1196
|
1438
|
else:
|
1197
|
|
- ax.scatter(ipm, self.DATADICT[pulse]["qeff"][ipm][stack][icv], facecolors='none', edgecolors=scolours)
|
1198
|
|
- scolours += np.array((0,1./(nstack+1),-1/(nstack+1.)))
|
|
1439
|
+ ax.scatter(ipm, self.DATADICT[pulse]["qeff"][ipm][stack][icv], facecolors='none', edgecolors=scolours[istack])
|
|
1440
|
+
|
1199
|
1441
|
|
1200
|
1442
|
percent = int(1e2* (float)((istack)+ipm*self.DATADICT["nPulseMoments"]) /
|
1201
|
1443
|
(float)(len(self.DATADICT["PULSES"])*self.DATADICT["nPulseMoments"]*nstack))
|
|
@@ -1419,7 +1661,7 @@ class GMRDataProcessor(SNMRDataProcessor):
|
1419
|
1661
|
self.DATADICT[pulse][ichan]["FFT"][istack] = np.zeros((self.DATADICT["nPulseMoments"] , len(self.DATADICT[pulse][ichan][0][istack])//2+1), dtype=complex)
|
1420
|
1662
|
for ipm in range(self.DATADICT["nPulseMoments"]):
|
1421
|
1663
|
|
1422
|
|
-
|
|
1664
|
+ mod = (-1)**(ipm%2) * (-1)**(istack%2)
|
1423
|
1665
|
self.DATADICT[pulse][ichan]["FFT"][istack][ipm,:] = np.fft.rfft( self.DATADICT[pulse][ichan][ipm][istack] )
|
1424
|
1666
|
|
1425
|
1667
|
|