| 1 |
# get and run the ab demo |
| 2 |
demo('ab') |
| 3 |
auto('ab.auto') |
| 4 |
# load data from b.ab, s.ab, and d.ab |
| 5 |
ab = loadbd('ab') |
| 6 |
# change the branch number to either 1 or 2 depending on IPS |
| 7 |
for branch in ab: |
| 8 |
branch['BR'] = branch.c['IPS'] |
| 9 |
# delete the last branch |
| 10 |
del ab[-1] |
| 11 |
# subtract the first branch from all other branches with respect to PAR(1) |
| 12 |
ab = subtract(ab, ab, 'PAR(1)') |
| 13 |
# plot the branches, coloring by branch number |
| 14 |
plot(ab, coloring_method='branch', color_list='black red') |
| 15 |
wait() |
| 16 |
# save data to b.abnew, s.abnew, and d.abnew |
| 17 |
save(ab, 'abnew') |