from rsf.proj import*
from rsf.prog import RSFROOT
def Grey(data,other):
Result(data,'put d1=0.004 o1=0 d2=1 o2=0 | grey clip=0.5 minval=-0.5 maxval=0.5 label2=Trace unit2="" label1=Time unit1="s" title="" wherexlabel=b scalebar=y color=g %s'%other)
matlab = WhereIs('matlab')
matROOT = '../matfun'
matfun = 'Linear'
matlabpath = os.environ.get('MATLABPATH',os.path.join(RSFROOT,'lib'))
if not matlab:
sys.stderr.write('\nCannot find Matlab.\n')
sys.exit(1)
Flow('syn02-clean syn02-noise syn02 syn02-fxdecon syn02-fxemd syn02-fxemdpf syn02-fxemdpf-2imf syn02-fxemdpf-3imf',[os.path.join(matROOT,matfun+'.m')],
'''MATLABPATH=%(matlabpath)s %(matlab)s
-nosplash -nojvm -r "addpath %(matROOT)s;%(matfun)s('${TARGETS[0]}','${TARGETS[1]}','${TARGETS[2]}','${TARGETS[3]}','${TARGETS[4]}','${TARGETS[5]}','${TARGETS[6]}','${TARGETS[7]}');quit"
'''%vars(),stdin=0,stdout=-1)
Flow('syn02-fxemdpf-1imf','syn02-fxemdpf','cp')
Flow('syn02-fxdecon-noise','syn02 syn02-fxdecon',' add scale=1,-1 ${SOURCES[1]}')
Flow('syn02-fxemd-noise','syn02 syn02-fxemd',' add scale=1,-1 ${SOURCES[1]}')
Flow('syn02-fxemdpf-noise','syn02 syn02-fxemdpf',' add scale=1,-1 ${SOURCES[1]}')
Flow('syn02-fxemdpf-1imf-noise','syn02-fxemdpf-noise','cp')
Flow('syn02-fxemdpf-2imf-noise','syn02 syn02-fxemdpf-2imf','add scale=1,-1 ${SOURCES[1]}')
Flow('syn02-fxemdpf-3imf-noise','syn02 syn02-fxemdpf-3imf','add scale=1,-1 ${SOURCES[1]}')
Grey('syn02',' max2=121')
Grey('syn02-clean',' max2=121')
Grey('syn02-noise',' max2=121')
Grey('syn02-fxdecon',' max2=121')
Grey('syn02-fxemd',' max2=121')
Grey('syn02-fxemdpf',' max2=121')
Grey('syn02-fxemdpf-1imf',' max2=121')
Grey('syn02-fxemdpf-2imf',' max2=121')
Grey('syn02-fxemdpf-3imf',' max2=121')
Grey('syn02-fxdecon-noise',' max2=121')
Grey('syn02-fxemd-noise',' max2=121')
Grey('syn02-fxemdpf-noise',' max2=121')
Grey('syn02-fxemdpf-1imf-noise',' max2=121')
Grey('syn02-fxemdpf-2imf-noise',' max2=121')
Grey('syn02-fxemdpf-3imf-noise',' max2=121')
End() |