Pārlūkot izejas kodu

Harmonic noise hacks.

tags/1.6.1
Trevor Irons 5 gadus atpakaļ
vecāks
revīzija
3dbc1aca4b
3 mainītis faili ar 4 papildinājumiem un 4 dzēšanām
  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 Parādīt failu

103
     f02 = guessf0(sN, fs)
103
     f02 = guessf0(sN, fs)
104
     print("minHarmonic", f0, fs, nK, " guess=", f02)
104
     print("minHarmonic", f0, fs, nK, " guess=", f02)
105
     # CG, BFGS, Newton-CG, L-BFGS-B, TNC, SLSQP, dogleg, trust-ncg, trust-krylov, trust-exact and trust-constr
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
     print(res)
107
     print(res)
108
     return harmonicEuler(res.x[0], sN, fs, nK, t)#[0]
108
     return harmonicEuler(res.x[0], sN, fs, nK, t)#[0]
109
 
109
 

+ 2
- 2
akvo/tressel/mrsurvey.py Parādīt failu

543
                                 label = "orig " +  pulse + " ipm=" + str(ipm) + " istack=" + str(istack) + " rchan="  + str(ichan))
543
                                 label = "orig " +  pulse + " ipm=" + str(ipm) + " istack=" + str(istack) + " rchan="  + str(ichan))
544
 
544
 
545
                         self.DATADICT[pulse][ichan][ipm][istack] = harmonic.minHarmonic( f0, self.DATADICT[pulse][ichan][ipm][istack], self.samp, 20, self.DATADICT[pulse]["TIMES"] ) 
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
                         # plot
548
                         # plot
549
                         if plot:
549
                         if plot:
557
                                 label = "orig " +  pulse + " ipm=" + str(ipm) + " istack=" + str(istack) + " chan="  + str(ichan))
557
                                 label = "orig " +  pulse + " ipm=" + str(ipm) + " istack=" + str(istack) + " chan="  + str(ichan))
558
                         
558
                         
559
                         self.DATADICT[pulse][ichan][ipm][istack] = harmonic.minHarmonic( f0, self.DATADICT[pulse][ichan][ipm][istack], self.samp, 20, self.DATADICT[pulse]["TIMES"] ) 
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
                         #self.DATADICT[pulse][ichan][ipm][istack] = harmonic.harmonicEuler( f0, self.DATADICT[pulse][ichan][ipm][istack], self.samp, 20, self.DATADICT[pulse]["TIMES"] ) 
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
                         # plot
563
                         # plot

+ 1
- 1
setup.py Parādīt failu

21
     long_description = fh.read()
21
     long_description = fh.read()
22
 
22
 
23
 setup(name='Akvo',
23
 setup(name='Akvo',
24
-      version='1.0.22',
24
+      version='1.0.23',
25
       description='Surface nuclear magnetic resonance workbench',
25
       description='Surface nuclear magnetic resonance workbench',
26
       long_description=long_description,
26
       long_description=long_description,
27
       long_description_content_type='text/markdown',
27
       long_description_content_type='text/markdown',

Notiek ielāde…
Atcelt
Saglabāt