Skip to content

Commit

Permalink
python3
Browse files Browse the repository at this point in the history
  • Loading branch information
sfomel committed Jan 19, 2024
1 parent 3072b5c commit 010bb3e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
9 changes: 4 additions & 5 deletions book/tccs/flat/comaz/SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -108,17 +108,16 @@ def plotpath(col,fat):
wantaxis=n wanttitle=n screenht=2.8 screenwd=14.6
''' % (col,fat)

pnames = map(lambda x,y: 'path-%d-%d' % (x,y),paths[0],paths[1])
pnames = ['path-%d-%d' % (x,y) for x in paths[0] for y in paths[1]]

Flow(['time']+pnames,'wcos',
'''
dijkstra ref1=150 ref2=18
nf=%d paths=%s fin1=%s fin2=%s
''' % (len(pnames),
string.join(map(lambda x: '${TARGETS[%d]}' % x,
range(1,len(pnames)+1)),':'),
string.join(map(str,paths[0]),','),
string.join(map(str,paths[1]),',')))
':'.join(['${TARGETS[%d]}' % x for x in range(1,len(pnames)+1)]),
','.join([str(x) for x in paths[0]]),
','.join([str(x) for x in paths[1]])))
Plot('time',
'''
grey color=j allpos=y
Expand Down
23 changes: 22 additions & 1 deletion book/tccs/flat/flat/SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ for n2 in range(104):
''' % (105-n2,105+n2+1))
Plot(paint,'grey allpos=y color=G wanttitle=n clip=0.03')
paints.append(paint)
paints.append('spaint')
#paints.append('spaint')
Plot('paints',paints,'Movie')

# Add coherence
Expand Down Expand Up @@ -187,6 +187,27 @@ np = len(picks)
Flow('spicks',picks,
'add ${SOURCES[1:%d]} | scale dscale=%g' % (np,1.0/np))

Plot('spicks0','spicks',
'''
window n1=200 min1=0 |
grey color=j allpos=y
Xscalebar=y Xbarreverse=y
title="Relative Age" clip=0.8
minval=0 maxval=0.8
''')
Plot('spicks1','spicks',
'''
window n1=200 min1=0 |
clip clip=0.8 |
contour c0=0 dc=0.04 nc=20
transp=y yreverse=y plotcol=7 plotfat=5
Xscalebar=y Xbarreverse=y barlabel=" "
wanttitle=n wantaxis=n
minval=0 maxval=0.8
''')
Result('spicks','spicks0 spicks1','Overlay')


Flow('flat','sigmoid-pad spicks','iwarp warp=${SOURCES[1]} eps=1 n1=200 o1=0')
Plot('flat','grey title="Multiple references" ')
Result('flat',['flat']+refs,'Overlay')
Expand Down

0 comments on commit 010bb3e

Please sign in to comment.