Переглянути джерело

Import fix from dmp

tags/1.6.1
Trevor Irons 5 роки тому
джерело
коміт
b82b52beab
3 змінених файлів з 6 додано та 7 видалено
  1. 1
    3
      akvo/gui/akvoGUI.py
  2. 2
    2
      akvo/tressel/harmonic.py
  3. 3
    2
      akvo/tressel/mrsurvey.py

+ 1
- 3
akvo/gui/akvoGUI.py Переглянути файл

@@ -794,8 +794,6 @@ class ApplicationWindow(QtWidgets.QMainWindow):
794 794
         self.RAWDataProc.nDAQVersion = self.RAWDataProc.DATADICT["INFO"]["nDAQVersion"]
795 795
         self.RAWDataProc.dt = 1./self.RAWDataProc.samp 
796 796
 
797
-
798
-
799 797
         self.dataChan = self.RAWDataProc.DATADICT[ self.RAWDataProc.DATADICT["PULSES"][0] ]["chan"]
800 798
         # Keep backwards compatibility with prior saved pickles???
801 799
         #self.ui.logTextBrowser.clear() 
@@ -816,7 +814,7 @@ class ApplicationWindow(QtWidgets.QMainWindow):
816 814
             self.RAWDataProc.interpulseDelay = self.RAWDataProc.DATADICT["INFO"]["interpulseDelay"]
817 815
 
818 816
         self.YamlNode.Import = OrderedDict((yaml.load( self.logText, Loader=yaml.Loader )).Import)
819
-        self.YamlNode.Processing = OrderedDict((yaml.load( self.logText, Loader=yaml.Loader )).Processing)
817
+        self.YamlNode.Processing = list((yaml.load( self.logText, Loader=yaml.Loader )).Processing)
820 818
         self.YamlNode.Stacking = OrderedDict((yaml.load( self.logText, Loader=yaml.Loader )).Stacking)
821 819
         self.Log()
822 820
  

+ 2
- 2
akvo/tressel/harmonic.py Переглянути файл

@@ -112,13 +112,13 @@ def minHarmonic2(sN, fs, t, f0, f0k1, f0kN, f0ks, f1, f1k1, f1kN, f1ks, Bounds,
112 112
 
113 113
         # CG, BFGS, Newton-CG, L-BFGS-B, TNC, SLSQP, dogleg, trust-ncg, trust-krylov, trust-exact and trust-constr
114 114
         print("2 UNbounded ( +-", Bounds,") search length ", kNs0, kNs1 ,"for f0", f0, f1)
115
-        res = minimize(harmonic2Norm, np.array((f0, f1)), args=(sN, fs, t, f0k1, f0k1+kNs0, f0ks, f1k1, f1k1+kNs1, f1ks), jac='2-point', method='BFGS') # hess=None, bounds=None )
115
+        res = minimize(harmonic2Norm, np.array((f0, f1)), args=(sN, fs, t, f0k1, kNs0, f0ks, f1k1, kNs1, f1ks), jac='2-point', method='BFGS') # hess=None, bounds=None )
116 116
     else:
117 117
         # Bounded
118 118
         bnds = ( (f0-Bounds, f0+Bounds),(f1-Bounds, f1+Bounds) )
119 119
         print("2 bounded ( +-", Bounds,") search length ", kNs0, kNs1 ,"for f0", f0, f1)
120 120
         # L-BFGS-B hess=None, bounds=None )
121
-        res = minimize(harmonic2Norm, ((f0,f1)), args=(sN, fs, t, f0k1, f0k1+kNs0, f0ks, f1k1, f1k1+kNs1, f1ks), jac='2-point', method='L-BFGS-B', bounds=bnds ) 
121
+        res = minimize(harmonic2Norm, ((f0,f1)), args=(sN, fs, t, f0k1, kNs0, f0ks, f1k1, kNs1, f1ks), jac='2-point', method='L-BFGS-B', bounds=bnds ) 
122 122
 
123 123
     return harmonicEuler2(sN, fs, t, res.x[0], f0k1, f0kN, f0ks, res.x[1], f1k1, f1kN, f1ks), res.x[0], res.x[1]#[0]
124 124
 

+ 3
- 2
akvo/tressel/mrsurvey.py Переглянути файл

@@ -2126,7 +2126,7 @@ class GMRDataProcessor(SNMRDataProcessor):
2126 2126
         self.windead = 0.    
2127 2127
         for ift in np.arange(100,0,-1):
2128 2128
             #print( ift, fft1[ift] )
2129
-            if fft1[ift] > .001:
2129
+            if (abs(fft1[ift])/abs(fft1[0])) > 1e-2:
2130 2130
                 #print ("DEAD TIME", 1e3*self.DATADICT[pulse]["TIMES"][ift] - 1e3*self.DATADICT[pulse]["TIMES"][0] ) 
2131 2131
                 dead = 1e3*self.DATADICT[pulse]["TIMES"][ift] - 1e3*self.DATADICT[pulse]["TIMES"][0]
2132 2132
                 self.windead = self.DATADICT[pulse]["TIMES"][ift] - self.DATADICT[pulse]["TIMES"][0]
@@ -2167,8 +2167,9 @@ class GMRDataProcessor(SNMRDataProcessor):
2167 2167
                 iFID += 1
2168 2168
             if trunc:
2169 2169
                 self.DATADICT[pulse]["TIMES"] = self.DATADICT[pulse]["TIMES"][idead:-idead]
2170
+                [WINDOWxx, ndxx, istart, iend, deadxx, ideadxx] = self.computeWindow(pulse, band, centre, ftype)
2170 2171
 
2171
-        self.plotFT(canvas, istart, iend)
2172
+            self.plotFT(canvas, istart, iend)
2172 2173
         self.doneTrigger.emit() 
2173 2174
 
2174 2175
     def bandpassFilter(self, canvas, blank, plot=True):

Завантаження…
Відмінити
Зберегти