Browse Source

reduced search for nls

add-license-1
Trevor Irons 7 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
     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 View File

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
 

Loading…
Cancel
Save