up [pdf]
from rsf.proj import *
# Fetch Files from repository
modelFiles=['vp_marmousi-ii.segy','vs_marmousi-ii.segy','density_marmousi-ii.segy']
outputFiles=['vp','vs','density']
for file in modelFiles:
    Fetch(file,"marm2")
# Convert Files to RSF
counter=0
for file in modelFiles:
    if file is 'vp_marmousi-ii.segy' or file is 'vs_marmousi-ii.segy':
        Flow(outputFiles[counter],file, ''' segyread tape=$SOURCE | put 
            d1=.001249 d2=.001249 o1=0 o2=0 label1=Depth label2=Distance
            unit1=km unit2=km''')
    if file is 'density_marmousi-ii.segy':
        Flow(outputFiles[counter],file, ''' segyread tape=$SOURCE | put 
            d1=.001249 d2=.001249 o1=0 o2=0 label1=Depth label2=Distance
            unit1=km unit2=km''')
    counter = counter+1
# Plotting Section
title=['Compressional\ Velocity\ Model','Shear\ Velocity\ Model','Density\ Model']
counter=0
for file in outputFiles:
    Flow(file+'small',file,'prep4plot inp=$SOURCE out=$TARGET',stdin=0,stdout=-1)
    if file is 'vp' or file is 'vs':
        Result(file,file+'small',
               '''
               grey  color=I gainpanel=a allpos=y title=%s
               scalebar=y screenratio=.205 screenht=2
               scalebar=y barlabel=Velocity barunit=km/s 
               labelsz=4 wheretitle=t titlesz=6 barreverse=y 
               ''' % title[counter])
    if file is 'density':
        Result(file,file+'small',
               '''
               grey  color=I gainpanel=a allpos=y title=%s
               scalebar=y screenratio=.205 screenht=2
               scalebar=y barlabel=Density barunit="g/cm\^3\_"
               labelsz=4 wheretitle=t titlesz=6 barreverse=y 
               ''' % title[counter])
    counter = counter+1
End()

sfsegyread
sfput
sfgrey

data/marm2/vp_marmousi-ii.segy
data/marm2/vs_marmousi-ii.segy
data/marm2/density_marmousi-ii.segy