瀏覽代碼

More tweaks to harmonic modelling

tags/1.6.1
Trevor Irons 5 年之前
父節點
當前提交
6e7f14da3e
共有 3 個檔案被更改,包括 5 行新增3 行删除
  1. 1
    1
      akvo/gui/akvoGUI.py
  2. 1
    1
      akvo/gui/main.ui
  3. 3
    1
      akvo/tressel/harmonic.py

+ 1
- 1
akvo/gui/akvoGUI.py 查看文件

@@ -1154,7 +1154,7 @@ class ApplicationWindow(QtWidgets.QMainWindow):
1154 1154
             self.Log()
1155 1155
         else:
1156 1156
             err_msg = "Harmonic modelling noise cancellation has already been applied!"
1157
-            reply =QtWidgets.QMessageBox.critical(self, 'Error', 
1157
+            reply = QtWidgets.QMessageBox.critical(self, 'Error', 
1158 1158
                 err_msg) 
1159 1159
             return 
1160 1160
 

+ 1
- 1
akvo/gui/main.ui 查看文件

@@ -1372,7 +1372,7 @@ background: dark grey;
1372 1372
                   <number>1</number>
1373 1373
                  </property>
1374 1374
                  <property name="maximum">
1375
-                  <number>10</number>
1375
+                  <number>100</number>
1376 1376
                  </property>
1377 1377
                  <property name="value">
1378 1378
                   <number>1</number>

+ 3
- 1
akvo/tressel/harmonic.py 查看文件

@@ -41,6 +41,7 @@ def minHarmonic(sN, fs, t, f0, k1, kN, ks):
41 41
     # CG, BFGS, Newton-CG, L-BFGS-B, TNC, SLSQP, dogleg, trust-ncg, trust-krylov, trust-exact and trust-constr
42 42
     res = minimize(harmonicNorm, np.array((f0)), args=(sN, fs, t, k1, kN, ks), jac='2-point', method='BFGS') # hess=None, bounds=None )
43 43
     #print(res)
44
+    #print ( "guess", guessf0(  harmonicEuler(sN, fs, t, res.x[0], k1, kN, ks), fs  ) )
44 45
     return harmonicEuler(sN, fs, t, res.x[0], k1, kN, ks)#[0]
45 46
 
46 47
 def harmonicEuler2 ( sN, fs, t, f0, f0k1, f0kN, f0ks, f1, f1k1, f1kN, f1ks ): 
@@ -92,7 +93,8 @@ def harmonic2Norm (f0, sN, fs, t, f0k1, f0kN, f0ks, f1k1, f1kN, f1ks):
92 93
 def minHarmonic2(sN, fs, t, f0, f0k1, f0kN, f0ks, f1, f1k1, f1kN, f1ks):
93 94
     # CG, BFGS, Newton-CG, L-BFGS-B, TNC, SLSQP, dogleg, trust-ncg, trust-krylov, trust-exact and trust-constr
94 95
     res = minimize(harmonic2Norm, np.array((f0, f1)), args=(sN, fs, t, f0k1, f0kN, f0ks, f1k1,f1kN, f1ks), jac='2-point', method='BFGS') # hess=None, bounds=None )
95
-    print(res)
96
+    #print(res)
97
+    #print ( "guess", guessf0(harmonicEuler2(sN, fs, t, res.x[0], f0k1, f0kN, f0ks, res.x[1], f1k1, f1kN, f1ks), fs)  )
96 98
     return harmonicEuler2(sN, fs, t, res.x[0], f0k1, f0kN, f0ks, res.x[1], f1k1, f1kN, f1ks)#[0]
97 99
 
98 100
 def guessf0( sN, fs ):

Loading…
取消
儲存