~ubuntu-branches/ubuntu/trusty/python-pyo/trusty

« back to all changes in this revision

Viewing changes to examples/synthesis/01_pulsar_synthesis.py

  • Committer: Package Import Robot
  • Author(s): Tiago Bortoletto Vaz
  • Date: 2013-01-30 00:41:56 UTC
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: package-import@ubuntu.com-20130130004156-bznl6b78sxa2640d
Tags: upstream-0.6.3+svn1068
ImportĀ upstreamĀ versionĀ 0.6.3+svn1068

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
frac.ctrl(title="Pulsar duty cycle")
21
21
 
22
22
# Pulsar synthesis
23
 
b = Compare(input=a, comp=frac, mode="<=")
24
 
scl = a * b * (1. / frac)
 
23
scl = a * (a <= frac) * (1. / frac)
25
24
c = Pointer(table=HannTable(), index=scl, mul=.05)
26
25
d = Pointer(table=t, index=scl, mul=c).out()
27
26