def plot(self, title): daxmin = 3186 #3125 #14 #3170 daxmax = 3301 #3440 dminfor = 3186 #3207 dmaxfor = 3301 #3440 #daxmin = 3207 #3170 #daxmax = 3440 #dminfor = 3207 #dmaxfor = 3440 self._title = title plt.rcParams.update({'font.size': 18, 'legend.fontsize': 15}) fig = figure(2, figsize=(18, 8)) cx = plt.subplot(1, 5, 1) cx.set_xlabel('Caliper (in)') cx.set_ylabel('Depth (ft)') cx.xaxis.set_major_locator(MaxNLocator(4)) cx.set_ylim(daxmax, daxmin) #cx.set_title('Well 159-2') p2 = plot(self._cal, self._depth, c='k') xlim(6, 11) ax = plt.subplot(1, 5, 2) ax.set_xlabel('Gamma Ray') p = ax.plot(self._gr, self._depth, c='k') ax.xaxis.set_major_locator(MaxNLocator(4)) ax.set_ylim(daxmax, daxmin) #ax.set_title('Well 159-2') colors = [ 1.0, 2., 3., 4., 5., 6., 7., 8., 9., 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0 ] n = len(self._depth) for i in range(n): if self._depth[i] > dminfor and self._depth[i] < dmaxfor: for j in range(len(colors)): if self._facies[i] == colors[j]: if colors[j] >= 5 and colors[j] <= 9: j = 4 c1 = 'k' p = ax.scatter(self._gr[i], self._depth[i], c=c1) elif colors[j] >= 50 and colors[j] <= 90: j = 13 c1 = 'k' p = ax.scatter(self._gr[i], self._depth[i], c=c1) else: c1 = cm.hsv((j + 1) / float(len(colors)), 1) p = ax.scatter(self._gr[i], self._depth[i], c=c1, edgecolor='none') ax.set_xlim(0, 200) ax.set_yticklabels([]) bx = plt.subplot(1, 5, 3) bx.set_xlabel(r'$\rho$ (g/cm$^3$)') bx.xaxis.set_major_locator(MaxNLocator(4)) bx.set_ylim(daxmax, daxmin) #bx.set_title('Well 159-2') p2 = plot(self._rhoD / 1000, self._depth, c='k', label=r'$\rho$ Obs') p1 = plot(self._rho_cal, self._depth, c='r', label=r'$\rho$ Cal') plt.legend() xlim(1.8, 2.9) bx.set_title(title) bx.set_yticklabels([]) ax = plt.subplot(1, 5, 4) ax.set_xlabel(r'$V_{p}$ (km/s)') #ax.set_ylabel('depth') p1 = plot(self._vpD / 1000, self._depth, c='k', label=r"$V_{p}$ Obs") p2 = plot(self._vp_cal / 1000, self._depth, c='r', label=r"$V_{p}$ Cal") ylim(self._dmax, self._dmin) ax.xaxis.set_major_locator(MaxNLocator(4)) xlim(1.5, 4) ax.set_ylim(daxmax, daxmin) #ax.set_title('Well 140-1') ax.set_yticklabels([]) plt.legend() ax = plt.subplot(1, 5, 5) ax.set_xlabel(r'$V_{s}$ (km/s)') #ax.set_ylabel('depth') p1 = plot(self._vsC / 1000, self._depth, c='k', label="Vs Obs") p2 = plot(self._vs_cal / 1000, self._depth, c='r', label="Vs Cal") ylim(self._dmax, self._dmin) ax.xaxis.set_major_locator(MaxNLocator(4)) xlim(.1, 2.8) ax.set_ylim(daxmax, daxmin) ax.set_yticklabels([]) plt.legend() fig.savefig(self._title + '_QC.pdf', bbox_inches='tight') fig = figure(3, figsize=(8, 6)) fig.suptitle(title) n = len(self._gr) lambd = np.zeros(n) vp1 = np.zeros(n) vp = np.zeros(n) kbri = 2.81e9 koil = 0.829e9 rhobri = 1030 rhooil = 0.69e3 ksatR, rhosatR, soR, kfluid = Gassman.kgassman(self._muSatC, self._phit, self._so, self._vsh, kbri, koil, rhobri, rhooil) for i in range(n): lambd[i] = ksatR[i] - 2.0 * self._muSatD[i] / 3.0 vp1[i] = np.power((lambd[i] + 2 * self._muSatC[i]) / rhosatR[i], 0.5) ax = plt.subplot(1, 3, 1) ax.set_ylabel('Depth (feet)') ax.set_xlabel('Gamma Ray') p = ax.plot(self._gr, self._depth, c='k') ax.xaxis.set_major_locator(MaxNLocator(4)) ax.set_ylim(daxmax, daxmin) colors = [ 1.0, 2., 3., 4., 5., 6., 7., 8., 9., 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0 ] n = len(self._depth) for i in range(n): if self._depth[i] > dminfor and self._depth[i] < dmaxfor: for j in range(len(colors)): if self._facies[i] == colors[j]: if colors[j] >= 5 and colors[j] <= 9: j = 4 c1 = 'k' p = ax.scatter(self._gr[i], self._depth[i], c=c1) elif colors[j] >= 50 and colors[j] <= 90: j = 13 c1 = 'k' p = ax.scatter(self._gr[i], self._depth[i], c=c1) else: c1 = cm.hsv((j + 1) / float(len(colors)), 1) p = ax.scatter(self._gr[i], self._depth[i], c=c1, edgecolor='none') ax.set_xlim(0, 200) bx = plt.subplot(1, 3, 2) bx.set_xlabel('Oil saturation') bx.plot(self._so * 100, self._depth, c='k') bx.set_xlim(0, 50) bx.xaxis.set_major_locator(MaxNLocator(4)) bx.set_yticklabels([]) bx.set_ylim(daxmax, daxmin) ax = plt.subplot(1, 3, 3) ax.set_xlabel('Vp (km/s)') p1 = ax.plot(self._vpD / 1000, self._depth, c='k', label='Vp obs') p2 = ax.plot(vp1 / 1000, self._depth, c='r', label='Vp cal') plt.legend() ax.set_yticklabels([]) ax.xaxis.set_major_locator(MaxNLocator(4)) ax.set_ylim(daxmax, daxmin) #ax.set_title('Well 159-2') ax.set_xlim(2, 4.0) fig.savefig(self._title + '_vp.pdf')
def plotDryratio(self,title,kbri,koil,ksat_well,gdry,kdry_well,phit,SO,gr,facies,depth,dmin,dmax,vsh): #phid,phit,ksat_well,vsh_iw,g,SO,depth,well,facies,sid = np.loadtxt(fileName,unpack=True) kdry= Gassman.kdry(ksat_well,phit,SO,vsh,kbri,koil) n1 = len(ksat_well) dry_ratio = np.zeros(n1) for i in range(n1): #print(vsh[i],depth[i]) dry_ratio[i]=(kdry_well[i]+4.0/3.0*gdry[i])/gdry[i] dry_ratio[i]=np.power(dry_ratio[i],0.5) fig = figure(7, figsize=(8, 6)) fig.suptitle(title) bx = plt.subplot(1,3,1) bx.set_xlabel('Gamma Ray') bx.set_ylabel('Depth (feet)') bx.xaxis.set_major_locator(MaxNLocator(4)) p=bx.plot(gr,depth,c='k') bx.set_ylim(dmax,dmin) #bx.set_title('') #bx.set_yticklabels([]) colors=[1.0,2.,3.,4.,5.,6.,7.,8.,9.,10.0,20.0,30.0,40.0,50.0,60.0,70.0,80.0,90.0] n = len(depth) for i in range(n): for j in range(len(colors)): if facies[i] == colors[j]: if colors[j] >=5 and colors[j]<=9: j = 4 c1='k' p=bx.scatter(gr[i],depth[i],c=c1) elif colors[j] >=50 and colors[j]<=90: j = 13 c1='k' p=bx.scatter(gr[i],depth[i],c=c1) else: c1=cm.hsv((j+1)/float(len(colors)),1) p=bx.scatter(gr[i],depth[i],c=c1,edgecolor='none') bx.set_xlim(0,160) bx = plt.subplot(1,3,2) bx.set_xlabel('Vp/Vs dry ratio') #bx.set_ylabel('Depth (ft)') #p=bx.scatter(dry_ratio,depth,c=SO,edgecolor='none') p1=bx.plot(dry_ratio,depth,c='k') bx.xaxis.set_major_locator(MaxNLocator(4)) #p.set_clim([0,0.5]) #cbar= plt.colorbar(p) #cbar.set_label('Oil saturation') ylim(dmax,dmin) bx.set_yticklabels([]) xlim(1.4,1.65) ''' bx = plt.subplot(1,5,3) bx.set_xlabel('Oil saturation') #bx.set_ylabel('Depth (ft)') #p=bx.scatter(dry_ratio,depth,c=SO,edgecolor='none') p1=bx.plot(SO,depth,c='k') bx.xaxis.set_major_locator(MaxNLocator(4)) #p.set_clim([0,0.5]) #cbar= plt.colorbar(p) #cbar.set_label('Oil saturation') bx.set_yticklabels([]) ylim(dmax,dmin) xlim(0,0.5) ''' kbri=2.8e9 koil=0.829e9 rhobri=1030 rhooil=0.66e3 #kgassman(kdry_well,phit,SO,vsh,kbri,koil,rhobri,rhooil) ksatR,rhosatR,soR,kfluid=Gassman.kgassman(kdry_well,phit,SO,vsh,kbri,koil,rhobri,rhooil) bx = plt.subplot(1,3,3) bx.set_xlabel('Kdry(GPa)') #bx.set_ylabel('Depth (ft)') #p=bx.scatter(dry_ratio,depth,c=SO,edgecolor='none') bx.plot(kdry_well/1e9,depth,c='k') bx.plot(kdry/1e9,depth,c='r',label='kdry obs') bx.set_xlim(0.0,17.0) #bx2 = bx.twiny() #bx2.plot(kfluid/1e9,depth,c='b',label='kfluid') #plt.legend() #bx2.set_xlabel('Kfluid(GPa)',color='b') bx.set_yticklabels([]) bx.xaxis.set_major_locator(MaxNLocator(4)) #p.set_clim([0,0.5]) #cbar= plt.colorbar(p) #cbar.set_label('Oil saturation') bx.set_ylim(dmax,dmin) #bx2.set_ylim(dmax,dmin) fig.savefig(title+'QC2.pdf') #bx2.set_xlim(0.0 ,2.5) ''' bx = plt.subplot(1,5,3) bx.set_xlabel('Oil saturation') #bx.set_ylabel('Depth (ft)') #p=bx.scatter(dry_ratio,depth,c=SO,edgecolor='none') #p1=bx.plot(SO,depth,c='k') p2=bx.plot(soR,depth,c='k') bx.xaxis.set_major_locator(MaxNLocator(4)) #p.set_clim([0,0.5]) #cbar= plt.colorbar(p) #cbar.set_label('Oil saturation') bx.set_yticklabels([]) ylim(dmax,dmin) xlim(0,0.5) ''' '''
def plottemplate(self,par,pref,vs,so,gdry,phit,vsh,kbri,koil,rhobri,rhooil,facies): fig = figure(11, figsize=(7, 5)) bx = plt.subplot(1,1,1) #bx.set_title('Paluxy and Tuscaloosa washover/transitioal facies') #bx.set_title('Tuscaloosa fluvial facies') bx.set_xlabel('Acoustic Impedance (kg/m$^2$s)*1e7') bx.set_ylabel(r'$V_{p}/V_{s}$') a= par['rtBrineCo2'] b= par['ipBrineCo2'] c= par['rtBrineOil'] d= par['ipBrineOil'] n = len(gdry) lambd = np.zeros(n) vp = np.zeros(n) vpvs = np.zeros(n) ip = np.zeros(n) ksatR,rhosatR,soR,kfluid=Gassman.kgassman(gdry,phit,so,vsh,kbri,koil,rhobri,rhooil) for i in range(len(gdry)): lambd[i]= ksatR[i]-2.0*gdry[i]/3.0 vp[i]=np.power((lambd[i]+2*gdry[i])/rhosatR[i],0.5) vpvs[i]=vp[i]/vs[i] ip[i] = vp[i]*rhosatR[i] bx.scatter(b[pref][0][:]/1e7,a[pref][0][:],c='b',edgecolor='none') bx.scatter(b[pref][9][:]/1e7,a[pref][9][:],c='r',edgecolor='none') bx.scatter(d[pref][9][:]/1e7,c[pref][9][:],c='g',edgecolor='none') #bx.scatter(d[pref][4][:]/1e7,c[pref][4][:],c='g',edgecolor='none') #p=bx.scatter(d[pref][9][:],c[pref][9][:],c=vsh) #p=bx.scatter(ip/1e7,vpvs,c=vsh,edgecolor='none') ipplot = np.zeros(n) vpvsplot =np.zeros(n) soplot =np.zeros(n) ''' for i in range(n): if facies[i]>=20 and facies[i]<=40 : vpvsplot[i]=vpvs[i] ipplot[i] = ip[i] soplot[i] = so[i] if facies[i]>=2 and facies[i]<=3 : vpvsplot[i]=vpvs[i] ipplot[i] = ip[i] soplot[i] = so[i] ''' for i in range(n): if facies[i]==4 : vpvsplot[i]=vpvs[i] ipplot[i] = ip[i] soplot[i] = so[i] p=bx.scatter(ipplot/1e7,vpvsplot,c=soplot) ''' for i in range(n): if facies[i]==1 : vpvsplot[i]=vpvs[i] ipplot[i] = ip[i] soplot[i] = so[i] ''' p=bx.scatter(ipplot/1e7,vpvsplot,c=soplot) cbar= plt.colorbar(p) cbar.set_label('Oil saturation') #plot(self._phi[:],self._gdry_c[:],'b') ylim(1.3,2.6) xlim(0.4,0.8) p.set_clim([0,0.5]) #fig.savefig('StaticModelingP.png') fig.savefig('StaticModelingTF.png')
def plot(self,title): daxmin = 3186 #3125 #14 #3170 daxmax = 3301 #3440 dminfor = 3186 #3207 dmaxfor = 3301 #3440 #daxmin = 3207 #3170 #daxmax = 3440 #dminfor = 3207 #dmaxfor = 3440 self._title = title plt.rcParams.update({'font.size': 18,'legend.fontsize': 15}) fig = figure(2, figsize=(18, 8)) cx = plt.subplot(1,5,1) cx.set_xlabel('Caliper (in)') cx.set_ylabel('Depth (ft)') cx.xaxis.set_major_locator(MaxNLocator(4)) cx.set_ylim(daxmax,daxmin ) #cx.set_title('Well 159-2') p2=plot(self._cal,self._depth,c='k') xlim(6,11) ax = plt.subplot(1,5,2) ax.set_xlabel('Gamma Ray') p=ax.plot(self._gr,self._depth,c='k') ax.xaxis.set_major_locator(MaxNLocator(4)) ax.set_ylim(daxmax,daxmin ) #ax.set_title('Well 159-2') colors=[1.0,2.,3.,4.,5.,6.,7.,8.,9.,10.0,20.0,30.0,40.0,50.0,60.0,70.0,80.0,90.0] n = len(self._depth) for i in range(n): if self._depth[i]>dminfor and self._depth[i]<dmaxfor: for j in range(len(colors)): if self._facies[i] == colors[j]: if colors[j] >=5 and colors[j]<=9: j = 4 c1='k' p=ax.scatter(self._gr[i],self._depth[i],c=c1) elif colors[j] >=50 and colors[j]<=90: j = 13 c1='k' p=ax.scatter(self._gr[i],self._depth[i],c=c1) else: c1=cm.hsv((j+1)/float(len(colors)),1) p=ax.scatter(self._gr[i],self._depth[i],c=c1,edgecolor='none') ax.set_xlim(0,200) ax.set_yticklabels([]) bx = plt.subplot(1,5,3) bx.set_xlabel(r'$\rho$ (g/cm$^3$)') bx.xaxis.set_major_locator(MaxNLocator(4)) bx.set_ylim(daxmax,daxmin ) #bx.set_title('Well 159-2') p2=plot(self._rhoD/1000,self._depth,c='k',label=r'$\rho$ Obs') p1=plot(self._rho_cal,self._depth,c='r',label=r'$\rho$ Cal') plt.legend() xlim(1.8,2.9) bx.set_title(title) bx.set_yticklabels([]) ax = plt.subplot(1,5,4) ax.set_xlabel(r'$V_{p}$ (km/s)') #ax.set_ylabel('depth') p1=plot(self._vpD/1000,self._depth, c ='k',label=r"$V_{p}$ Obs") p2=plot(self._vp_cal/1000,self._depth,c='r',label=r"$V_{p}$ Cal") ylim(self._dmax,self._dmin) ax.xaxis.set_major_locator(MaxNLocator(4)) xlim(1.5,4) ax.set_ylim(daxmax,daxmin ) #ax.set_title('Well 140-1') ax.set_yticklabels([]) plt.legend() ax = plt.subplot(1,5,5) ax.set_xlabel(r'$V_{s}$ (km/s)') #ax.set_ylabel('depth') p1=plot(self._vsC/1000,self._depth,c='k',label="Vs Obs") p2=plot(self._vs_cal/1000,self._depth,c='r',label="Vs Cal") ylim(self._dmax,self._dmin) ax.xaxis.set_major_locator(MaxNLocator(4)) xlim(.1,2.8) ax.set_ylim(daxmax,daxmin ) ax.set_yticklabels([]) plt.legend() fig.savefig(self._title+'_QC.pdf', bbox_inches='tight') fig = figure(3, figsize=(8, 6)) fig.suptitle(title) n = len(self._gr) lambd = np.zeros(n) vp1 = np.zeros(n) vp = np.zeros(n) kbri=2.81e9 koil=0.829e9 rhobri=1030 rhooil=0.69e3 ksatR,rhosatR,soR,kfluid=Gassman.kgassman(self._muSatC,self._phit,self._so,self._vsh,kbri,koil,rhobri,rhooil) for i in range(n): lambd[i]= ksatR[i]-2.0*self._muSatD[i]/3.0 vp1[i]=np.power((lambd[i]+2*self._muSatC[i])/rhosatR[i],0.5) ax = plt.subplot(1,3,1) ax.set_ylabel('Depth (feet)') ax.set_xlabel('Gamma Ray') p=ax.plot(self._gr,self._depth,c='k') ax.xaxis.set_major_locator(MaxNLocator(4)) ax.set_ylim(daxmax,daxmin ) colors=[1.0,2.,3.,4.,5.,6.,7.,8.,9.,10.0,20.0,30.0,40.0,50.0,60.0,70.0,80.0,90.0] n = len(self._depth) for i in range(n): if self._depth[i]>dminfor and self._depth[i]<dmaxfor: for j in range(len(colors)): if self._facies[i] == colors[j]: if colors[j] >=5 and colors[j]<=9: j = 4 c1='k' p=ax.scatter(self._gr[i],self._depth[i],c=c1) elif colors[j] >=50 and colors[j]<=90: j = 13 c1='k' p=ax.scatter(self._gr[i],self._depth[i],c=c1) else: c1=cm.hsv((j+1)/float(len(colors)),1) p=ax.scatter(self._gr[i],self._depth[i],c=c1,edgecolor='none') ax.set_xlim(0,200) bx = plt.subplot(1,3,2) bx.set_xlabel('Oil saturation') bx.plot(self._so*100,self._depth,c='k') bx.set_xlim(0,50) bx.xaxis.set_major_locator(MaxNLocator(4)) bx.set_yticklabels([]) bx.set_ylim(daxmax,daxmin ) ax = plt.subplot(1,3,3) ax.set_xlabel('Vp (km/s)') p1=ax.plot(self._vpD/1000,self._depth,c='k',label='Vp obs') p2=ax.plot(vp1/1000,self._depth,c='r',label='Vp cal') plt.legend() ax.set_yticklabels([]) ax.xaxis.set_major_locator(MaxNLocator(4)) ax.set_ylim(daxmax,daxmin ) #ax.set_title('Well 159-2') ax.set_xlim(2,4.0) fig.savefig(self._title+'_vp.pdf')