1
#!/usr/bin/env python
2
#-*- mode: python -*-
3
4
from convention import *
5
import_convention(globals())
6
7
from fdtd.source import *
8
9
# program start
10
11
t = numpy.arange(-10, 10, 0.001)
12
    
13
pylab.plot(t, map( polynomial_pulse, t ) )
14
pylab.plot(t, map( polynomial_pulse_p, t ) )
15
pylab.plot(t, map( polynomial_pulse_pp, t ) )
16
17
pylab.xlim(-2, 2)
18
# pylab.ylim(-0.5, 1.5)
19
pylab.grid(True)
20
pylab.savefig("poly.png")
21
pylab.gcf().clear()
22
os.system("open poly.png")
23
24
25
26
one = numpy.ones_like(t)
27
28
pylab.plot(t, map( gaussian, t, one*2, one*3 ) )
29
pylab.plot(t, map( gaussian_p, t, one*2, one*3 ) )
30
31
pylab.grid(True)
32
pylab.savefig("gaussian.png")
33
pylab.gcf().clear()
34
os.system("open gaussian.png")