In [1]:
import sys,os
import numpy as np
import matplotlib.pyplot as plt
%pylab inline
import test_signals as tst
sys.path.insert(0, os.path.join(sys.path[0], '..'))
import extlib as xl
Populating the interactive namespace from numpy and matplotlib
In [22]:
factor = 3000
Nx = 301
Ny = 301
Nz = 201
data = tst.SphericalSignal(factor,Nx,Ny,Nz)
truederiv = tst.SphericalSignal(factor,Nx,Ny,Nz,deriv='dy')
tslice = truederiv.xSlice(Nx//2)
result = np.zeros((Ny,Nz))
itrc = 0
for indata in data.getXslice(Nx//2,1,1):
result[itrc,:] = xl.scharr3_dy(indata, full=False)
tmp1 = indata[:,:,149]*.12026 + indata[:,:,150]*.75948 + indata[:,:,151]*.12026
tmp2 = tmp1[0,:]*.12026+tmp1[1,:]*.75948+tmp1[2,:]*.12026
tmp3 = 0.5*tmp2[2]-0.5*tmp2[0]
print(tmp3, result[itrc,150], tslice[150,itrc], tmp3/tslice[150,itrc])
# result[itrc,:] = indata[1,1,:]
itrc += 1
'''
truederiv = tst.SphericalSignal(factor,Nx,Ny,Nz,deriv='dy')
#truederiv = tst.SphericalSignal(factor,Nx,Ny,Nz)
diff = np.abs((truederiv.xSlice(Nx//2) - np.transpose(result))/truederiv.xSlice(Nx//2))*100
f,ax = plt.subplots(3,1,figsize=(8,12))
ax[0].set_xlabel('Y')
ax[0].set_ylabel('Z')
ax[0].set_title('True Derivative X Slice - d/dy')
imt = ax[0].imshow(truederiv.xSlice(Nx//2),cmap='seismic',interpolation='bilinear')
f.colorbar(imt, ax=ax[0])
ax[1].set_xlabel('Y')
ax[1].set_ylabel('Z')
ax[1].set_title('Scharr3 Derviative X Slice - d/dy')
imf = ax[1].imshow(np.transpose(result),cmap='seismic',interpolation='bilinear')
f.colorbar(imf, ax=ax[1])
ax[2].set_xlabel('Y')
ax[2].set_ylabel('Y')
ax[2].set_title('Error - d/dy')
imd = ax[2].imshow(diff,cmap='viridis',vmin=0, vmax=100, interpolation='bilinear')
f.colorbar(imd, ax=ax[2])
f.tight_layout()
'''
0.0738339103981 0.0738339103981 0.110030634562 0.671030487934
0.0699526083446 0.0699526083446 0.0354958371299 1.97072710494
-0.0833614204988 -0.0833614204988 -0.0431327085729 1.93267298199
-0.220888353065 -0.220888353065 -0.113552790478 1.94524812764
-0.322126866832 -0.322126866832 -0.165279670793 1.94898056903
-0.372992016209 -0.372992016209 -0.191136827829 1.95143981641
-0.367561168626 -0.367561168626 -0.188140830177 1.95364912699
-0.30847745542 -0.30847745542 -0.157696951377 1.95614089382
-0.206061403348 -0.206061403348 -0.105133701614 1.95999380012
-0.0763685310199 -0.0763685310199 -0.0386999655124 1.97334881333
0.0614373155765 0.0614373155765 0.0317845924871 1.93292758438
0.187961401836 0.187961401836 0.0964033483768 1.94973935035
0.286278696081 0.286278696081 0.146522049842 1.9538267202
0.344096334772 0.344096334772 0.175889577007 1.9563202131
0.355126792726 0.355126792726 0.181332871716 1.95842479836
0.319553653241 0.319553653241 0.162987076713 1.96060730511
0.243606546807 0.243606546807 0.124070785007 1.96344809774
0.138379354272 0.138379354272 0.0702761576628 1.96907968327
0.0181122512167 0.0181122512167 0.00888748436122 2.0379502771
-0.101794200575 -0.101794200575 -0.0522343715001 1.94879726991
-0.206757447658 -0.206757447658 -0.105660971914 1.95680054719
-0.284737397127 -0.284737397127 -0.145273329953 1.96001149846
-0.327517540912 -0.327517540912 -0.166910986849 1.96222877292
-0.331427608729 -0.331427608729 -0.168735245367 1.96418719758
-0.297472516115 -0.297472516115 -0.151289486248 1.96624711665
-0.230907291492 -0.230907291492 -0.117277630753 1.96889457954
-0.140359034408 -0.140359034408 -0.0711129270864 1.97374851744
-0.0366390871235 -0.0366390871235 -0.01831047087 2.00099098399
0.068591049596 0.068591049596 0.0351930324876 1.94899514897
0.164137517914 0.164137517914 0.0837095258158 1.96079856282
0.240432499589 0.240432499589 0.122387257128 1.96452233043
0.290423262029 0.290423262029 0.147660274704 1.96683409001
0.310123252722 0.310123252722 0.157525343528 1.96871973599
0.298800435341 0.298800435341 0.151634179371 1.97053485291
0.258819138786 0.258819138786 0.131209756988 1.97256015656
0.195185943332 0.195185943332 0.0988127803077 1.97531071106
0.114874802119 0.114874802119 0.0579968237714 1.98070850521
0.0260203857405 0.0260203857405 0.0128975221243 2.01747168872
-0.0629284010468 -0.0629284010468 -0.0321974501647 1.95445293727
-0.144009453385 -0.144009453385 -0.0732543844676 1.96588169339
-0.210432056379 -0.210432056379 -0.106839657769 1.96960623774
-0.257093426143 -0.257093426143 -0.13038000993 1.97187763892
-0.280897451081 -0.280897451081 -0.142322149999 1.97367346602
-0.280867714217 -0.280867714217 -0.142187944301 1.9753272023
-0.258066583446 -0.258066583446 -0.130531410878 1.97704584445
-0.215348167287 -0.215348167287 -0.108811818196 1.97908803343
-0.156984280446 -0.156984280446 -0.079202878394 1.98205271866
-0.0882088738354 -0.0882088738354 -0.0443611567982 1.98842591587
-0.0147278182116 -0.0147278182116 -0.00717747981889 2.05194839738
0.0577619223897 0.0577619223897 0.0294663821987 1.96026515913
0.124005943505 0.124005943505 0.0629166966851 1.97095445309
0.179549692778 0.179549692778 0.0909277439607 1.97464145658
0.221000063515 0.221000063515 0.111793121479 1.97686638132
0.246182021081 0.246182021081 0.124423817141 1.97857634284
0.254190406392 0.254190406392 0.128373249118 1.98008859431
0.245345134882 0.245345134882 0.123813538826 1.98156952147
0.221064289751 0.221064289751 0.111470437415 1.98316517705
0.183673865154 0.183673865154 0.0925264516037 1.98509574257
0.136175123259 0.136175123259 0.068502802526 1.9878766742
0.0819908352217 0.0819908352217 0.0411309784183 1.99340833539
0.0247103548258 0.0247103548258 0.012223949732 2.02147058582
-0.032149117478 -0.032149117478 -0.0164442139817 1.95504129987
-0.0853511865068 -0.0853511865068 -0.0432433508093 1.97374127836
-0.132108877183 -0.132108877183 -0.0667718617642 1.97851121254
-0.170207311067 -0.170207311067 -0.0859180896015 1.98104161599
-0.198078395825 -0.198078395825 -0.0998974403801 1.98281752837
-0.214828889628 -0.214828889628 -0.108265984049 1.98426949623
-0.220226003953 -0.220226003953 -0.110912676639 1.98558010343
-0.214646805969 -0.214646805969 -0.108033395722 1.9868560507
-0.198999048419 -0.198999048419 -0.100090659959 1.98818799378
-0.174621719471 -0.174621719471 -0.087763228394 1.98969115729
-0.143173640355 -0.143173640355 -0.0718897832558 1.99157145663
-0.106517947803 -0.106517947803 -0.0534106439968 1.99432060414
-0.06660940171 -0.06660940171 -0.0333110013587 1.99962171634
-0.025390282187 -0.025390282187 -0.0125685620783 2.02014216335
0.0153006941768 0.0153006941768 0.00789218106962 1.93871555174
0.0538033913143 0.0538033913143 0.0272375375127 1.97533977839
0.0886934936991 0.0886934936991 0.0447532230508 1.98183477419
0.118821478211 0.118821478211 0.0598637507208 1.9848652445
0.143333875281 0.143333875281 0.0721429053289 1.98680486497
0.161678222839 0.161678222839 0.0813160220844 1.98827019195
0.17359374648 0.17359374648 0.0872551039146 1.98949675941
0.179090214915 0.179090214915 0.0899680181297 1.99059864425
0.178417635547 0.178417635547 0.0895831186234 1.99164349588
0.172029494444 0.172029494444 0.0863306567616 1.99268140539
0.160542137317 0.160542137317 0.0805222874194 1.99376026764
0.144692665685 0.144692665685 0.0725298626126 1.99493919433
0.125297417784 0.125297417784 0.0627645502834 1.99630870003
0.103212747977 0.103212747977 0.0516571356708 1.99803466911
0.0792994394131 0.0792994394131 0.0396401713344 2.00048175232
0.0543917061653 0.0543917061653 0.0271324512353 2.00467350678
0.0292713823499 0.0292713823499 0.014526103903 2.01508832274
0.00464757108862 0.00464757108862 0.002176436795 2.13540365578
-0.0188582544877 -0.0188582544877 -0.00960547664464 1.96328148882
-0.0407219371514 -0.0407219371514 -0.0205575912709 1.98087103761
-0.0605215270246 -0.0605215270246 -0.0304692794869 1.98631303542
-0.0779379264204 -0.0779379264204 -0.0391815932711 1.98914643111
-0.0927519181246 -0.0927519181246 -0.0465857173545 1.99099473813
-0.104838247357 -0.104838247357 -0.0526199514192 1.99236685952
-0.114157431941 -0.114157431941 -0.0572655607198 1.99347444619
-0.120745950221 -0.120745950221 -0.0605418214404 1.99442215889
-0.124705408716 -0.124705408716 -0.062500562771 1.99526857338
-0.1261912278 -0.1261912278 -0.0632204753448 1.99604996818
-0.125401309703 -0.125401309703 -0.0628014182757 1.99679104622
-0.122565074083 -0.122565074083 -0.0613589171692 1.99751038215
-0.117933166614 -0.117933166614 -0.0590190053148 1.99822355502
-0.111768068968 -0.111768068968 -0.0559135215664 1.99894526113
-0.104335766975 -0.104335766975 -0.0521759424898 1.9996910836
-0.0958985694204 -0.0958985694204 -0.0479377941464 2.00047939477
-0.0867091141302 -0.0867091141302 -0.0433256609638 2.00133390239
-0.0770055512138 -0.0770055512138 -0.0384587857886 2.00228763428
-0.0670078557 -0.0670078557 -0.0334472364581 2.00338989991
-0.0569151929437 -0.0569151929437 -0.0283905998779 2.00471963215
-0.0469042394961 -0.0469042394961 -0.0233771543446 2.00641356106
-0.0371283487698 -0.0371283487698 -0.0184834642715 2.00873322362
-0.0277174438529 -0.0277174438529 -0.0137743380817 2.01225232665
-0.0187785181972 -0.0187785181972 -0.00930308931959 2.01852498155
-0.0103966276369 -0.0103966276369 -0.00511204247923 2.03375219966
-0.00263626328618 -0.00263626328618 -0.0012332281765 2.1376930372
0.00445699655811 0.00445699655811 0.00231078335215 1.92878166357
0.0108546471393 0.0108546471393 0.00550595626319 1.9714372255
0.0165433110022 0.0165433110022 0.00834581081536 1.98222933256
0.0215227536028 0.0215227536028 0.0108304271206 1.98724882805
0.0258039180616 0.0258039180616 0.0129654595004 1.99020467116
0.0294070253096 0.0294070253096 0.0147611844685 1.99218601816
0.0323597755637 0.0323597755637 0.0162316001955 1.99362818046
0.0346956776902 0.0346956776902 0.0173935906189 1.99473923759
0.0364525246838 0.0364525246838 0.018266163194 1.99563117314
0.0376710262622 0.0376710262622 0.018869765675 1.9963695846
0.0383936034555 0.0383936034555 0.0192256842611 1.99699542207
0.038663345028 0.038663345028 0.0193555229318 1.99753554395
0.0385231215356 0.0385231215356 0.0192807617875 1.99800827167
0.0380148497208 0.0380148497208 0.0190223906741 1.99842650548
0.0371788976743 0.0371788976743 0.0186006132426 1.99879956587
0.0360536196542 0.0360536196542 0.0180346158387 1.99913433015
0.0346750085348 0.0346750085348 0.0173423951664 1.99943596038
0.0330764534683 0.0330764534683 0.0165406384857 1.99970838472
0.0312885903742 0.0312885903742 0.015644650127 1.99995462475
0.029339233244 0.029339233244 0.0146683183019 2.00017702372
0.0272533748786 0.0272533748786 0.0136241165059 2.00037740919
0.0250532464829 0.0250532464829 0.0125231342236 2.0005572116
0.022758426483 0.022758426483 0.0113751321172 2.00071755199
0.0203859899296 0.0203859899296 0.0101886173829 2.00085930833
0.0179506908802 0.0179506908802 0.0089709354799 2.00098316618
0.0154651711684 0.0154651711684 0.00772837494158 2.00108965795
0.0129401899401 0.0129401899401 0.00646628247062 2.0011791936
0.0103848692416 0.0103848692416 0.00518918597094 2.00125208458
0.00780695176836 0.00780695176836 0.0039009235828 2.00130856261
0.00521306760691 0.00521306760691 0.00260477714958 2.00134879399
0.00260900741681 0.00260900741681 0.00130360885249 2.00137289021
-2.77555756156e-17 -3.10934611392e-17 -0.0 inf
-0.00260900741681 -0.00260900741681 -0.00130360885249 2.00137289021
-0.00521306760691 -0.00521306760691 -0.00260477714958 2.00134879399
-0.00780695176836 -0.00780695176836 -0.0039009235828 2.00130856261
-0.0103848692416 -0.0103848692416 -0.00518918597094 2.00125208458
-0.0129401899401 -0.0129401899401 -0.00646628247062 2.0011791936
-0.0154651711684 -0.0154651711684 -0.00772837494158 2.00108965795
-0.0179506908802 -0.0179506908802 -0.0089709354799 2.00098316618
-0.0203859899296 -0.0203859899296 -0.0101886173829 2.00085930833
-0.022758426483 -0.022758426483 -0.0113751321172 2.00071755199
-0.0250532464829 -0.0250532464829 -0.0125231342236 2.0005572116
-0.0272533748786 -0.0272533748786 -0.0136241165059 2.00037740919
-0.029339233244 -0.029339233244 -0.0146683183019 2.00017702372
-0.0312885903742 -0.0312885903742 -0.015644650127 1.99995462475
-0.0330764534683 -0.0330764534683 -0.0165406384857 1.99970838472
-0.0346750085348 -0.0346750085348 -0.0173423951664 1.99943596038
-0.0360536196542 -0.0360536196542 -0.0180346158387 1.99913433015
-0.0371788976743 -0.0371788976743 -0.0186006132426 1.99879956587
-0.0380148497208 -0.0380148497208 -0.0190223906741 1.99842650548
-0.0385231215356 -0.0385231215356 -0.0192807617875 1.99800827167
-0.038663345028 -0.038663345028 -0.0193555229318 1.99753554395
-0.0383936034555 -0.0383936034555 -0.0192256842611 1.99699542207
-0.0376710262622 -0.0376710262622 -0.018869765675 1.9963695846
-0.0364525246838 -0.0364525246838 -0.018266163194 1.99563117314
-0.0346956776902 -0.0346956776902 -0.0173935906189 1.99473923759
-0.0323597755637 -0.0323597755637 -0.0162316001955 1.99362818046
-0.0294070253096 -0.0294070253096 -0.0147611844685 1.99218601816
-0.0258039180616 -0.0258039180616 -0.0129654595004 1.99020467116
-0.0215227536028 -0.0215227536028 -0.0108304271206 1.98724882805
-0.0165433110022 -0.0165433110022 -0.00834581081536 1.98222933256
-0.0108546471393 -0.0108546471393 -0.00550595626319 1.9714372255
-0.00445699655811 -0.00445699655811 -0.00231078335215 1.92878166357
0.00263626328618 0.00263626328618 0.0012332281765 2.1376930372
0.0103966276369 0.0103966276369 0.00511204247923 2.03375219966
0.0187785181972 0.0187785181972 0.00930308931959 2.01852498155
0.0277174438529 0.0277174438529 0.0137743380817 2.01225232665
0.0371283487698 0.0371283487698 0.0184834642715 2.00873322362
0.0469042394961 0.0469042394961 0.0233771543446 2.00641356106
0.0569151929437 0.0569151929437 0.0283905998779 2.00471963215
0.0670078557 0.0670078557 0.0334472364581 2.00338989991
0.0770055512138 0.0770055512138 0.0384587857886 2.00228763428
0.0867091141302 0.0867091141302 0.0433256609638 2.00133390239
0.0958985694204 0.0958985694204 0.0479377941464 2.00047939477
0.104335766975 0.104335766975 0.0521759424898 1.9996910836
0.111768068968 0.111768068968 0.0559135215664 1.99894526113
0.117933166614 0.117933166614 0.0590190053148 1.99822355502
0.122565074083 0.122565074083 0.0613589171692 1.99751038215
0.125401309703 0.125401309703 0.0628014182757 1.99679104622
0.1261912278 0.1261912278 0.0632204753448 1.99604996818
0.124705408716 0.124705408716 0.062500562771 1.99526857338
0.120745950221 0.120745950221 0.0605418214404 1.99442215889
0.114157431941 0.114157431941 0.0572655607198 1.99347444619
0.104838247357 0.104838247357 0.0526199514192 1.99236685952
0.0927519181246 0.0927519181246 0.0465857173545 1.99099473813
0.0779379264204 0.0779379264204 0.0391815932711 1.98914643111
0.0605215270246 0.0605215270246 0.0304692794869 1.98631303542
0.0407219371514 0.0407219371514 0.0205575912709 1.98087103761
0.0188582544877 0.0188582544877 0.00960547664464 1.96328148882
-0.00464757108862 -0.00464757108862 -0.002176436795 2.13540365578
-0.0292713823499 -0.0292713823499 -0.014526103903 2.01508832274
-0.0543917061653 -0.0543917061653 -0.0271324512353 2.00467350678
-0.0792994394131 -0.0792994394131 -0.0396401713344 2.00048175232
-0.103212747977 -0.103212747977 -0.0516571356708 1.99803466911
-0.125297417784 -0.125297417784 -0.0627645502834 1.99630870003
-0.144692665685 -0.144692665685 -0.0725298626126 1.99493919433
-0.160542137317 -0.160542137317 -0.0805222874194 1.99376026764
-0.172029494444 -0.172029494444 -0.0863306567616 1.99268140539
-0.178417635547 -0.178417635547 -0.0895831186234 1.99164349588
-0.179090214915 -0.179090214915 -0.0899680181297 1.99059864425
-0.17359374648 -0.17359374648 -0.0872551039146 1.98949675941
-0.161678222839 -0.161678222839 -0.0813160220844 1.98827019195
-0.143333875281 -0.143333875281 -0.0721429053289 1.98680486497
-0.118821478211 -0.118821478211 -0.0598637507208 1.9848652445
-0.0886934936991 -0.0886934936991 -0.0447532230508 1.98183477419
-0.0538033913143 -0.0538033913143 -0.0272375375127 1.97533977839
-0.0153006941768 -0.0153006941768 -0.00789218106962 1.93871555174
0.025390282187 0.025390282187 0.0125685620783 2.02014216335
0.06660940171 0.06660940171 0.0333110013587 1.99962171634
0.106517947803 0.106517947803 0.0534106439968 1.99432060414
0.143173640355 0.143173640355 0.0718897832558 1.99157145663
0.174621719471 0.174621719471 0.087763228394 1.98969115729
0.198999048419 0.198999048419 0.100090659959 1.98818799378
0.214646805969 0.214646805969 0.108033395722 1.9868560507
0.220226003953 0.220226003953 0.110912676639 1.98558010343
0.214828889628 0.214828889628 0.108265984049 1.98426949623
0.198078395825 0.198078395825 0.0998974403801 1.98281752837
0.170207311067 0.170207311067 0.0859180896015 1.98104161599
0.132108877183 0.132108877183 0.0667718617642 1.97851121254
0.0853511865068 0.0853511865068 0.0432433508093 1.97374127836
0.032149117478 0.032149117478 0.0164442139817 1.95504129987
-0.0247103548258 -0.0247103548258 -0.012223949732 2.02147058582
-0.0819908352217 -0.0819908352217 -0.0411309784183 1.99340833539
-0.136175123259 -0.136175123259 -0.068502802526 1.9878766742
-0.183673865154 -0.183673865154 -0.0925264516037 1.98509574257
-0.221064289751 -0.221064289751 -0.111470437415 1.98316517705
-0.245345134882 -0.245345134882 -0.123813538826 1.98156952147
-0.254190406392 -0.254190406392 -0.128373249118 1.98008859431
-0.246182021081 -0.246182021081 -0.124423817141 1.97857634284
-0.221000063515 -0.221000063515 -0.111793121479 1.97686638132
-0.179549692778 -0.179549692778 -0.0909277439607 1.97464145658
-0.124005943505 -0.124005943505 -0.0629166966851 1.97095445309
-0.0577619223897 -0.0577619223897 -0.0294663821987 1.96026515913
0.0147278182116 0.0147278182116 0.00717747981889 2.05194839738
0.0882088738354 0.0882088738354 0.0443611567982 1.98842591587
0.156984280446 0.156984280446 0.079202878394 1.98205271866
0.215348167287 0.215348167287 0.108811818196 1.97908803343
0.258066583446 0.258066583446 0.130531410878 1.97704584445
0.280867714217 0.280867714217 0.142187944301 1.9753272023
0.280897451081 0.280897451081 0.142322149999 1.97367346602
0.257093426143 0.257093426143 0.13038000993 1.97187763892
0.210432056379 0.210432056379 0.106839657769 1.96960623774
0.144009453385 0.144009453385 0.0732543844676 1.96588169339
0.0629284010468 0.0629284010468 0.0321974501647 1.95445293727
-0.0260203857405 -0.0260203857405 -0.0128975221243 2.01747168872
-0.114874802119 -0.114874802119 -0.0579968237714 1.98070850521
-0.195185943332 -0.195185943332 -0.0988127803077 1.97531071106
-0.258819138786 -0.258819138786 -0.131209756988 1.97256015656
-0.298800435341 -0.298800435341 -0.151634179371 1.97053485291
-0.310123252722 -0.310123252722 -0.157525343528 1.96871973599
-0.290423262029 -0.290423262029 -0.147660274704 1.96683409001
-0.240432499589 -0.240432499589 -0.122387257128 1.96452233043
-0.164137517914 -0.164137517914 -0.0837095258158 1.96079856282
-0.068591049596 -0.068591049596 -0.0351930324876 1.94899514897
0.0366390871235 0.0366390871235 0.01831047087 2.00099098399
0.140359034408 0.140359034408 0.0711129270864 1.97374851744
0.230907291492 0.230907291492 0.117277630753 1.96889457954
0.297472516115 0.297472516115 0.151289486248 1.96624711665
0.331427608729 0.331427608729 0.168735245367 1.96418719758
0.327517540912 0.327517540912 0.166910986849 1.96222877292
0.284737397127 0.284737397127 0.145273329953 1.96001149846
0.206757447658 0.206757447658 0.105660971914 1.95680054719
0.101794200575 0.101794200575 0.0522343715001 1.94879726991
-0.0181122512167 -0.0181122512167 -0.00888748436122 2.0379502771
-0.138379354272 -0.138379354272 -0.0702761576628 1.96907968327
-0.243606546807 -0.243606546807 -0.124070785007 1.96344809774
-0.319553653241 -0.319553653241 -0.162987076713 1.96060730511
-0.355126792726 -0.355126792726 -0.181332871716 1.95842479836
-0.344096334772 -0.344096334772 -0.175889577007 1.9563202131
-0.286278696081 -0.286278696081 -0.146522049842 1.9538267202
-0.187961401836 -0.187961401836 -0.0964033483768 1.94973935035
-0.0614373155765 -0.0614373155765 -0.0317845924871 1.93292758438
0.0763685310199 0.0763685310199 0.0386999655124 1.97334881333
0.206061403348 0.206061403348 0.105133701614 1.95999380012
0.30847745542 0.30847745542 0.157696951377 1.95614089382
0.367561168626 0.367561168626 0.188140830177 1.95364912699
0.372992016209 0.372992016209 0.191136827829 1.95143981641
0.322126866832 0.322126866832 0.165279670793 1.94898056903
0.220888353065 0.220888353065 0.113552790478 1.94524812764
0.0833614204988 0.0833614204988 0.0431327085729 1.93267298199
-0.0699526083446 -0.0699526083446 -0.0354958371299 1.97072710494
-0.0738339103981 -0.0738339103981 -0.110030634562 0.671030487934
/opt/anaconda/3/lib/python3.6/site-packages/ipykernel_launcher.py:15: RuntimeWarning: divide by zero encountered in double_scalars
from ipykernel import kernelapp as app
Out[22]:
" \ntruederiv = tst.SphericalSignal(factor,Nx,Ny,Nz,deriv='dy')\n#truederiv = tst.SphericalSignal(factor,Nx,Ny,Nz)\ndiff = np.abs((truederiv.xSlice(Nx//2) - np.transpose(result))/truederiv.xSlice(Nx//2))*100\nf,ax = plt.subplots(3,1,figsize=(8,12))\nax[0].set_xlabel('Y')\nax[0].set_ylabel('Z')\nax[0].set_title('True Derivative X Slice - d/dy')\nimt = ax[0].imshow(truederiv.xSlice(Nx//2),cmap='seismic',interpolation='bilinear')\nf.colorbar(imt, ax=ax[0])\n\nax[1].set_xlabel('Y')\nax[1].set_ylabel('Z')\nax[1].set_title('Scharr3 Derviative X Slice - d/dy')\nimf = ax[1].imshow(np.transpose(result),cmap='seismic',interpolation='bilinear')\nf.colorbar(imf, ax=ax[1])\n\nax[2].set_xlabel('Y')\nax[2].set_ylabel('Y')\nax[2].set_title('Error - d/dy')\nimd = ax[2].imshow(diff,cmap='viridis',vmin=0, vmax=100, interpolation='bilinear')\nf.colorbar(imd, ax=ax[2])\nf.tight_layout()\n"
Content source: waynegm/OpendTect-External-Attributes
Similar notebooks: