from rsf.proj import * txt = 'slicing_seismic.txt' Fetch(txt,'data', server='https://raw.githubusercontent.com', top='agile-geoscience/notebooks/master') Flow('seismic',txt, ''' echo data_format=ascii_float in=$SOURCE n1=500 n2=10000 label1=Time unit1=s d1=0.001 o1=0 | dd form=native | put n2=100 n3=100 label2=Inline unit2= label3=Crossline unit3= | byte gainpanel=all ''') frame1=122 frame2=30 frame3=60 Result('seismic', ''' grey3 frame1=%d frame2=%d frame3=%d title=Seismic screenratio=1 ''' % (frame1,frame2,frame3)) Result('seismic2','seismic', ''' grey3 frame1=%d frame2=%d frame3=%d title=Seismic screenratio=1 flat=n point1=0.7 point2=0.7sc ''' % (frame1,frame2,frame3)) Flow('slice1','seismic','window n1=1 f1=%d' % (frame1-1)) Flow('slice2','seismic','window n2=1 f2=%d' % (frame2-1)) Flow('slice3','seismic','window n3=1 f3=%d' % (frame3-1)) def line(n,frame,col,acol): return ''' dd type=float | math output=x%d-%g | contour nc=1 c0=0 wantaxis=n wanttitle=n plotfat=5 allpos=n plotcol=%d axiscol=%d ''' % (n,frame,col,acol) Plot('slice1','grey title="Time Slice at %d ms" screenratio=1' % frame1) Plot('line12','slice1',line(1,frame2,6,4) + ' screenratio=1') Plot('line13','slice1',line(2,frame3,5,4) + ' screenratio=1') Plot('sliced1','slice1 line12 line13','Overlay') Plot('slice2','grey title="Inline %d" ' % frame2) Plot('line21','slice2',line(1,frame1*0.001,4,6)) Plot('line23','slice2',line(2,frame3,5,6)) Plot('sliced2','slice2 line21 line23','Overlay') Plot('slice3','grey title="Crossline %d" ' % frame3) Plot('line31','slice3',line(1,frame1*0.001,4,5)) Plot('line32','slice3',line(2,frame2,6,5)) Plot('sliced3','slice3 line31 line32','Overlay') Plot('vertical','sliced2 sliced3','SideBySideAniso',vppen='txscale=1.5') Result('slices','sliced1 vertical','SideBySideIso') End() |