from rsf.proj import*
from rsf.prog import RSFROOT
def Grey(data,other):
Result(data,'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 = 'Hyper'
matlabpath = os.environ.get('MATLABPATH',os.path.join(RSFROOT,'lib'))
if not matlab:
sys.stderr.write('\nCannot find Matlab.\n')
sys.exit(1)
Flow('syn03-clean syn03-noise syn03 syn03-fxdecon syn03-fxemd syn03-fxemdpf',[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]}');quit"
'''%vars(),stdin=0,stdout=-1)
Flow('syn03-fxdecon-noise','syn03 syn03-fxdecon',' add scale=1,-1 ${SOURCES[1]}')
Flow('syn03-fxemd-noise','syn03 syn03-fxemd',' add scale=1,-1 ${SOURCES[1]}')
Flow('syn03-fxemdpf-noise','syn03 syn03-fxemdpf',' add scale=1,-1 ${SOURCES[1]}')
Grey('syn03',' max2=76')
Grey('syn03-clean',' max2=76')
Grey('syn03-noise',' max2=76')
Grey('syn03-fxdecon',' max2=76')
Grey('syn03-fxemd',' max2=76')
Grey('syn03-fxemdpf',' max2=76')
Grey('syn03-fxdecon-noise',' max2=76')
Grey('syn03-fxemd-noise',' max2=76')
Grey('syn03-fxemdpf-noise',' max2=76')
End() |