Browse Source

Harmonic noise hacks.

tags/1.6.1
Trevor Irons 5 years ago
parent
commit
3dbc1aca4b
3 changed files with 4 additions and 4 deletions
  1. 1
    1
      akvo/tressel/harmonic.py
  2. 2
    2
      akvo/tressel/mrsurvey.py
  3. 1
    1
      setup.py

+ 1
- 1
akvo/tressel/harmonic.py View File

@@ -103,7 +103,7 @@ def minHarmonic(f0, sN, fs, nK, t):
103 103
     f02 = guessf0(sN, fs)
104 104
     print("minHarmonic", f0, fs, nK, " guess=", f02)
105 105
     # CG, BFGS, Newton-CG, L-BFGS-B, TNC, SLSQP, dogleg, trust-ncg, trust-krylov, trust-exact and trust-constr
106
-    res = minimize(harmonicNorm, np.array((f0)), args=(sN, fs, nK, t), jac='2-point', method='BFGS') #, jac=jacEuler) #, hess=None, bounds=None )
106
+    res = minimize(harmonicNorm, np.array((f02)), args=(sN, fs, nK, t), jac='2-point', method='BFGS') #, jac=jacEuler) #, hess=None, bounds=None )
107 107
     print(res)
108 108
     return harmonicEuler(res.x[0], sN, fs, nK, t)#[0]
109 109
 

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

@@ -543,7 +543,7 @@ class GMRDataProcessor(SNMRDataProcessor):
543 543
                                 label = "orig " +  pulse + " ipm=" + str(ipm) + " istack=" + str(istack) + " rchan="  + str(ichan))
544 544
 
545 545
                         self.DATADICT[pulse][ichan][ipm][istack] = harmonic.minHarmonic( f0, self.DATADICT[pulse][ichan][ipm][istack], self.samp, 20, self.DATADICT[pulse]["TIMES"] ) 
546
-                        #self.DATADICT[pulse][ichan][ipm][istack] = harmonic.minHarmonic2( f0-.25, f0+.25, self.DATADICT[pulse][ichan][ipm][istack], self.samp, 20, self.DATADICT[pulse]["TIMES"] ) 
546
+                        #self.DATADICT[pulse][ichan][ipm][istack] = harmonic.minHarmonic2( f0-1e-2, f0+1e-2, self.DATADICT[pulse][ichan][ipm][istack], self.samp, 30, self.DATADICT[pulse]["TIMES"] ) 
547 547
 
548 548
                         # plot
549 549
                         if plot:
@@ -557,7 +557,7 @@ class GMRDataProcessor(SNMRDataProcessor):
557 557
                                 label = "orig " +  pulse + " ipm=" + str(ipm) + " istack=" + str(istack) + " chan="  + str(ichan))
558 558
                         
559 559
                         self.DATADICT[pulse][ichan][ipm][istack] = harmonic.minHarmonic( f0, self.DATADICT[pulse][ichan][ipm][istack], self.samp, 20, self.DATADICT[pulse]["TIMES"] ) 
560
-                        #self.DATADICT[pulse][ichan][ipm][istack] = harmonic.minHarmonic2( f0-.25, f0+.25, self.DATADICT[pulse][ichan][ipm][istack], self.samp, 20, self.DATADICT[pulse]["TIMES"] ) 
560
+                        #self.DATADICT[pulse][ichan][ipm][istack] = harmonic.minHarmonic2( f0-1e-2, f0+1e-2, self.DATADICT[pulse][ichan][ipm][istack], self.samp, 30, self.DATADICT[pulse]["TIMES"] ) 
561 561
                         #self.DATADICT[pulse][ichan][ipm][istack] = harmonic.harmonicEuler( f0, self.DATADICT[pulse][ichan][ipm][istack], self.samp, 20, self.DATADICT[pulse]["TIMES"] ) 
562 562
                
563 563
                         # plot

+ 1
- 1
setup.py View File

@@ -21,7 +21,7 @@ with open("README.md", "r") as fh:
21 21
     long_description = fh.read()
22 22
 
23 23
 setup(name='Akvo',
24
-      version='1.0.22',
24
+      version='1.0.23',
25 25
       description='Surface nuclear magnetic resonance workbench',
26 26
       long_description=long_description,
27 27
       long_description_content_type='text/markdown',

Loading…
Cancel
Save