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

reduced search for nls

add-license-1
Trevor Irons 6 роки тому
джерело
коміт
9a4bca5d80
2 змінених файлів з 4 додано та 4 видалено
  1. 2
    2
      akvo/tressel/decay.py
  2. 2
    2
      akvo/tressel/rotate.py

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

296
     if x0=="None":
296
     if x0=="None":
297
         x0 = np.array( [1., 0., 0., .2] )
297
         x0 = np.array( [1., 0., 0., .2] )
298
         res_lsq = least_squares(fun, x0, args=(tt, np.concatenate((X, Y))), loss='cauchy', f_scale=1.0,\
298
         res_lsq = least_squares(fun, x0, args=(tt, np.concatenate((X, Y))), loss='cauchy', f_scale=1.0,\
299
-            bounds=( [1., 0, -13, .005] , [1000., 2*np.pi, 13, .800] ))
299
+            bounds=( [1., -np.pi, -5, .005] , [1000., np.pi, 5, .800] ))
300
     else:
300
     else:
301
         res_lsq = least_squares(fun, x0, args=(tt, np.concatenate((X, Y))), loss='cauchy', f_scale=1.0,\
301
         res_lsq = least_squares(fun, x0, args=(tt, np.concatenate((X, Y))), loss='cauchy', f_scale=1.0,\
302
-            bounds=( [1., 0, -13, .005] , [1000., 2*np.pi, 13, .800] ))
302
+            bounds=( [1., -np.pi, -5, .005] , [1000., np.pi, 5, .800] ))
303
 
303
 
304
         #bounds=( [0., 0, -20, .0] , [1., np.pi, 20, .6] ))
304
         #bounds=( [0., 0, -20, .0] , [1., np.pi, 20, .6] ))
305
 
305
 

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

25
         # decimate
25
         # decimate
26
     # blind decimation
26
     # blind decimation
27
     # 1 instead of T 
27
     # 1 instead of T 
28
-    irsamp = (T) * int(  (1./vL) / dt) # real 
28
+    irsamp = int(T) * int(  (1./vL) / dt) # real 
29
     iisamp =       int(  ((1./vL)/ dt) * ( .5*np.pi / (2.*np.pi) ) ) # imaginary
29
     iisamp =       int(  ((1./vL)/ dt) * ( .5*np.pi / (2.*np.pi) ) ) # imaginary
30
    
30
    
31
 
31
 
78
     #############################################################
78
     #############################################################
79
     ## In-phase 
79
     ## In-phase 
80
     #2*np.cos(wL*t)  
80
     #2*np.cos(wL*t)  
81
-    dw = -2.*np.pi*2
81
+    dw = 0 # -2.*np.pi*2
82
     Q = signal.filtfilt(b, a, xn*2*np.cos((wL+dw)*t))  # X
82
     Q = signal.filtfilt(b, a, xn*2*np.cos((wL+dw)*t))  # X
83
     I = signal.filtfilt(b, a, xn*2*np.sin((wL+dw)*t))  # Y
83
     I = signal.filtfilt(b, a, xn*2*np.sin((wL+dw)*t))  # Y
84
 
84
 

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