up [pdf]
from rsf.proj import *
from rsf.recipes.helderiv import Helderiv

for case in [1,5]:
    Fetch('jbreast%d.asci' % case,'mammogram')

Flow('mam1','jbreast1.asci',
     '''
     echo "in=$SOURCE data_format=ascii_float n1=3401 n2=4386" |
     dd form=native |
     window f1=1400 n1=1600 f2=400 n2=900 |
     smooth rect1=4 rect2=4 |
     window j1=5 j2=5
     ''',stdin=0)

Flow('mam5','jbreast5.asci',
     '''
     echo "in=$SOURCE data_format=ascii_float n1=501 n2=1166" |
     dd form=native |
     smooth rect1=2 rect2=2 |
     window    j1=2    j2=2 |
     transp |
     reverse which=1
     ''',stdin=0)

def plot(title):
    return 'grey color=i crowd=.9 pclip=99.8 title="%s" ' % title

Helderiv('hel',na=10)

for case in [1,5]:
    mam = 'mam%d' % case
    hel = 'hel%d' % case
    Plot(mam,plot('Mammogram') + ' allpos=y')
    Plot(hel,[mam,'hel'],
         'helicon filt=${SOURCES[1]} | ' + plot('Helix Derivative'))

Result('scratch','mam1 hel1','SideBySideAniso')
Result('mam',    'mam5 hel5','SideBySideAniso')

###########################################################################
End()

sfdd
sfwindow
sfsmooth
sftransp
sfreverse
sfwilson
sfgrey
sfhelicon

data/mammogram/jbreast1.asci
data/mammogram/jbreast5.asci