from rsf.proj import *
Flow('step',None,
'''
spike nsp=3 n1=101 k1=26,51,76 mag=-1,2,-1 d1=1 label1= unit1= |
causint |
noise seed=62009 var=0.001
''')
Result('step','dots')
Flow('smooth','step','smooth rect1=10')
Result('smooth','dots')
Flow('spray','step','spray axis=2 d=1 o=-10 n=21')
Result('spray','dots')
Flow('shift','spray','window n1=1 | math output=x1')
Flow('local','spray shift',
'datstretch datum=${SOURCES[1]}')
Result('local','dots')
Flow('triangle','local','math output="1-abs(x2)/10" ')
Flow('tnorm','triangle','stack')
Result('triangle','dots gaineach=n title="Triangle Weight" ')
Flow('smooth2','local triangle tnorm',
'''
add mode=p ${SOURCES[1]} |
stack |
add mode=d ${SOURCES[2]}
''')
Result('smooth2','dots title="Triangle Smoothing 2" ')
Flow('similarity','spray local triangle',
'math loc=${SOURCES[1]} tri=${SOURCES[2]} output="tri*exp(-10*(input-loc)^2)"')
Result('similarity','dots gaineach=n title="Similarity Weight" ')
Flow('nlnorm','similarity','stack')
Flow('nlsmooth','local similarity nlnorm',
'''
add mode=p ${SOURCES[1]} |
stack |
add mode=d ${SOURCES[2]}
''')
Result('nlsmooth','dots')
End() |