Browse Source

PyPi V. 1.6.1

tags/1.6.1
Trevor Irons 2 years ago
parent
commit
856030f1a3
2 changed files with 11 additions and 8 deletions
  1. 10
    7
      akvo/tressel/invertTA.py
  2. 1
    1
      setup.py

+ 10
- 7
akvo/tressel/invertTA.py View File

234
         mmax = np.max(np.abs(VV))
234
         mmax = np.max(np.abs(VV))
235
         mmin = np.min(VV)
235
         mmin = np.min(VV)
236
 
236
 
237
-        obs = ax1.pcolor(TT, QQQ, VV, cmap=cmocean.cm.curl_r, vmin=-mmax, vmax=mmax, shading='nearest')  # pcolor edge not defined 
237
+        obs = ax1.pcolor(TT, QQQ, VV, cmap=cmocean.cm.curl_r, vmin=-mmax, vmax=mmax, shading='auto')  # pcolor edge not defined 
238
         ax1.set_title("observed")
238
         ax1.set_title("observed")
239
  
239
  
240
         pre = np.dot(KQT[ich*ntq:(ich+1)*ntq,:], inv)
240
         pre = np.dot(KQT[ich*ntq:(ich+1)*ntq,:], inv)
241
  
241
  
242
         PRE = np.reshape( pre, np.shape(VV)  )
242
         PRE = np.reshape( pre, np.shape(VV)  )
243
-        prem = ax2.pcolor(TT, QQQ, PRE, cmap=cmocean.cm.curl_r, vmin=-mmax, vmax=mmax,shading='nearest' )
243
+        prem = ax2.pcolor(TT, QQQ, PRE, cmap=cmocean.cm.curl_r, vmin=-mmax, vmax=mmax,shading='auto' )
244
         ax2.set_title("predicted")
244
         ax2.set_title("predicted")
245
 
245
 
246
         cbar = plt.colorbar(prem, axc1)
246
         cbar = plt.colorbar(prem, axc1)
250
 
250
 
251
         DIFF = (PRE-VV) / VVS
251
         DIFF = (PRE-VV) / VVS
252
         md = np.max(np.abs(DIFF))
252
         md = np.max(np.abs(DIFF))
253
-        dim = ax3.pcolor(TT, QQQ, DIFF, cmap=cmocean.cm.balance, vmin=-md, vmax=md, shading='nearest')
253
+        dim = ax3.pcolor(TT, QQQ, DIFF, cmap=cmocean.cm.balance, vmin=-md, vmax=md, shading='auto')
254
         ax3.set_title("misfit / $\widehat{\sigma}$")
254
         ax3.set_title("misfit / $\widehat{\sigma}$")
255
     
255
     
256
         cbar2 = plt.colorbar(dim, axc2)
256
         cbar2 = plt.colorbar(dim, axc2)
260
         #plt.colorbar(dim, ax3)
260
         #plt.colorbar(dim, ax3)
261
     
261
     
262
         figx.suptitle(ch + " linear Inversion")
262
         figx.suptitle(ch + " linear Inversion")
263
+        plt.savefig(ch + "dataspace.pdf")
263
 
264
 
264
         ich += 1
265
         ich += 1
265
 
266
 
357
             mmax = np.max(np.abs(VV))
358
             mmax = np.max(np.abs(VV))
358
             mmin = np.min(VV)
359
             mmin = np.min(VV)
359
 
360
 
360
-            obs = ax1.pcolor(TT, QQQ, VV, cmap=cmocean.cm.curl_r, vmin=-mmax, vmax=mmax, shading='nearest')
361
+            obs = ax1.pcolor(TT, QQQ, VV, cmap=cmocean.cm.curl_r, vmin=-mmax, vmax=mmax, shading='auto')
361
             ax1.set_title("observed")
362
             ax1.set_title("observed")
362
 
363
 
363
             ## Here neds to change  
364
             ## Here neds to change  
364
             pre = np.abs(np.dot(KQTc[ich*ntq:(ich+1)*ntq,:], inv))
365
             pre = np.abs(np.dot(KQTc[ich*ntq:(ich+1)*ntq,:], inv))
365
  
366
  
366
             PRE = np.reshape( pre, np.shape(VV)  )
367
             PRE = np.reshape( pre, np.shape(VV)  )
367
-            prem = ax2.pcolor(TT, QQQ, PRE, cmap=cmocean.cm.curl_r, vmin=-mmax, vmax=mmax, shading='nearest' )
368
+            prem = ax2.pcolor(TT, QQQ, PRE, cmap=cmocean.cm.curl_r, vmin=-mmax, vmax=mmax, shading='auto' )
368
             ax2.set_title("predicted")
369
             ax2.set_title("predicted")
369
 
370
 
370
             cbar = plt.colorbar(prem, axc1)
371
             cbar = plt.colorbar(prem, axc1)
374
 
375
 
375
             DIFF = (PRE-VV) / VVS
376
             DIFF = (PRE-VV) / VVS
376
             md = np.max(np.abs(DIFF))
377
             md = np.max(np.abs(DIFF))
377
-            dim = ax3.pcolor(TT, QQQ, DIFF, cmap=cmocean.cm.balance, vmin=-md, vmax=md, shading='nearest')
378
+            dim = ax3.pcolor(TT, QQQ, DIFF, cmap=cmocean.cm.balance, vmin=-md, vmax=md, shading='auto')
378
             ax3.set_title("misfit / $\widehat{\sigma}$")
379
             ax3.set_title("misfit / $\widehat{\sigma}$")
379
     
380
     
380
             cbar2 = plt.colorbar(dim, axc2)
381
             cbar2 = plt.colorbar(dim, axc2)
384
             #plt.colorbar(dim, ax3)
385
             #plt.colorbar(dim, ax3)
385
     
386
     
386
             figx.suptitle(ch + " non-linear Inversion")
387
             figx.suptitle(ch + " non-linear Inversion")
388
+        
389
+            plt.savefig(ch + "_NLdataspace.pdf")
387
 
390
 
388
             ich += 1
391
             ich += 1
389
 
392
 
474
         ax1.set_xlim( ifaces[0], ifaces[-1] )
477
         ax1.set_xlim( ifaces[0], ifaces[-1] )
475
         ax1.set_xlabel(u"depth (m)")
478
         ax1.set_xlabel(u"depth (m)")
476
         ax1.set_ylabel(u"depth (m)")
479
         ax1.set_ylabel(u"depth (m)")
477
-
480
+        plt.savefig("resolutionmatrix.pdf")
478
         pdf.close()
481
         pdf.close()
479
 
482
 
480
     INV = np.reshape(inv, (len(ifaces)-1,cont["T2Bins"]["number"]) )
483
     INV = np.reshape(inv, (len(ifaces)-1,cont["T2Bins"]["number"]) )

+ 1
- 1
setup.py View File

21
     long_description = fh.read()
21
     long_description = fh.read()
22
 
22
 
23
 setup(name='Akvo',     
23
 setup(name='Akvo',     
24
-      version='1.6.0', 
24
+      version='1.6.1', 
25
       python_requires='>3.7.0', # due to pyLemma 
25
       python_requires='>3.7.0', # due to pyLemma 
26
       description='Surface nuclear magnetic resonance workbench',
26
       description='Surface nuclear magnetic resonance workbench',
27
       long_description=long_description,
27
       long_description=long_description,

Loading…
Cancel
Save