ambiguity(wrong)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
from __future__ import division
from mpmath import *
mp.dps = 15
#S = cos(om0*(t+a*t**2/2))
#integrate(S*S2*e**(-om*t),(t,-inf,inf))
def Signal(t,tau=10**(-5),f0=10^9,DeltaF=10^7):
ttau = 0.5*tau
a = 2*DeltaF/tau
return cos(3.14*t*(f0+0.5*a*t)) * (-ttau <= t <= ttau)
def f(T, F,tau=10**(-5)):
r = (quad(lambda t:
conj(Signal(t-T,tau))*
Signal(t,tau)*
exp(-j*2*3.14*F*t),
[-tau,0,tau] )
)
return r
def make_data():
DeltaT=1.3*10**(-5)
DeltaF=4.*10**6
dT = DeltaT/8
dF = DeltaF/12
T = arange(-DeltaT,DeltaT+dT,dT)
F = arange(-DeltaF,DeltaF+dF,dF)
print '#dt=%s, df=%s\n#x y z'%(dT,dF)
norm = abs(f(0,0))
for i in T:
for j in F:
z = abs(f(i,j))/norm
print i,j,z
print
return (T,F,z)
if __name__ == "__main__":
make_data()
print "#set palette defined (0 1 1 1, 0.05 0.6 0.6 0.6, 0.1 0.4 0.4 0.4, 1 0 0 0)"