Browse Source

reduced search for nls

add-license-1
Trevor Irons 6 years ago
parent
commit
9a4bca5d80
2 changed files with 4 additions and 4 deletions
  1. 2
    2
      akvo/tressel/decay.py
  2. 2
    2
      akvo/tressel/rotate.py

+ 2
- 2
akvo/tressel/decay.py View File

@@ -296,10 +296,10 @@ def quadratureDetect2(X, Y, tt, x0="None"):
296 296
     if x0=="None":
297 297
         x0 = np.array( [1., 0., 0., .2] )
298 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 300
     else:
301 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 304
         #bounds=( [0., 0, -20, .0] , [1., np.pi, 20, .6] ))
305 305
 

+ 2
- 2
akvo/tressel/rotate.py View File

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

Loading…
Cancel
Save