up [pdf]
from rsf.proj import *

# Download data
Fetch('horizon.asc','hall')

# Convert format
Flow('horizon','horizon.asc',
     '''
     echo in=$SOURCE data_format=ascii_float n1=3 n2=57036 | 
     dd form=native | window n1=1 f1=-1 |
     put
     n1=196 o1=33.139 d1=0.01 label1=y unit1=km
     n2=291 o2=35.031 d2=0.01 label2=x unit2=km 
     ''')

# Triangle smoothing
Flow('smoothed','horizon','smooth rect1=20 rect2=20')

# Display results
for horizon in ('horizon','smoothed'):
    # --- CHANGE BELOW ---
    Plot(horizon,'grey color=j bias=0 yreverse=n wanttitle=n')
    edge = 'edge-'+horizon
    Flow(edge,horizon,'canny max=98 | dd type=float')
    Plot(edge,'grey allpos=y yreverse=n wanttitle=n')
    Result(horizon,[horizon,edge],'SideBySideIso')

End()

sfdd
sfwindow
sfput
sfsmooth
sfgrey
sfcanny

data/hall/horizon.asc