In [2]:
import numpy as np 
import matplotlib.pyplot as plt
import matplotlib as mpl
import h5py
import cmath

print(mpl.__version__)

cmap = plt.get_cmap('rainbow')
c1 = "blue"#cmap(20)
c2 = "green"#cmap(150)


floc = "../../build/res.h5"
file = h5py.File(floc)

from matplotlib import rc
rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']})
## for Palatino and other serif fonts use:
#rc('font',**{'family':'serif','serif':['Palatino']})
rc('text', usetex=True)


plt.rc('font', family='serif')
plt.rc('xtick', labelsize=30)
plt.rc('ytick', labelsize=30)


fig = plt.figure()


ax = fig.add_subplot(111)




t=49001
dstr =  "/dset"+str(t)
r = "real"
im = "img"
#e = (dstr+r) in file
#print(e)
dsetr = np.array(file[dstr+r])
dseti = np.array(file[dstr+im])
param = np.array(file["/params"])

nx = param[4]

x = np.linspace(param[1],param[0],param[4])


#ax.plot(x, dsetr, label = "$\mathrm{Re}\{ \psi_n \} \ numerical $",linewidth=3,c="purple")
#ax.plot(x, dseti, label = "$\mathrm{Im}\{ \psi_n \} \ numerical $",linewidth=2,c="red")
ax.plot(x, dseti**2+dsetr**2, label=r"$|\psi_n|^2$ disturbed", linewidth=2)
plt.legend(loc="best",prop={'size':30},frameon=False)
#ax.plot(x, dsetr**2+dseti**2, label = "$|\psi(x)|^2 \ numerical$")
i = 0
dstr =  "/dset"+str(i)
dsetr2 = np.array(file[dstr+r])
dseti2 = np.array(file[dstr+im])
E = param[-1]
#E = -1.0
dt = (param[2] - param[3])/param[5]
psi = dsetr2 + 1j * dseti2

i =  0
#i = np.int32(np.pi/(dt*E))
print(t*dt)

print(i)
t -= 1
i = t
U = np.exp( -1j* E * i * dt)
#U = -np.sin(E*t*dt)

#ax.plot(x,psi.real, label = "$\mathrm{Re}\{\psi_{n}\} \ analytical$")
print(U)
#ax.plot(x, psi.imag, label = "$\mathrm{Im}\{ \psi_n \} \ initial $")
psi = psi*U

print(param)


#ax.plot(x, np.abs(psi.imag-dseti), "o",label = " $\Delta \mathfrak{Im}\{\psi_n\}$")
#ax.plot(x,psi.real, label = "$\mathrm{Re}\{\psi_{n}\} \ undisturbed$",linewidth=1, c="blue")
#ax.plot(x, psi.imag, label = "$\mathrm{Im}\{ \psi_n \} \ undisturbed $",linewidth=2, color="green")
ax.plot(x, psi.real**2+psi.imag**2, linewidth=2, label="$|\psi_n|^2, undisturbed$")
#label=r"$|\psi_n|^2 \, undisturbed$",

ax.set_xlabel(r"$x \ (a.u)$", size = 30)
ax.set_ylabel(r"$\psi_n(x)$", size = 30)
#ax.set_title(r"Numerical result at $t_j = t_{"+str(i)+"}$ with $ \Delta t ="+str(dt)+"$",
#          size = 40, y = 1.05)


ax.text(13.1673, 0.143, "$t_j = t_{"+str(i)+"}$", size=30)


ax.legend(loc="best",prop={'size':30},frameon=False)


#plt.tight_layout()
print(dt)
plt.show()




file.close()


1.5.1
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-2-dabc12d2879e> in <module>()
     41 #e = (dstr+r) in file
     42 #print(e)
---> 43 dsetr = np.array(file[dstr+r])
     44 dseti = np.array(file[dstr+im])
     45 param = np.array(file["/params"])

h5py/_objects.pyx in h5py._objects.with_phil.wrapper (/Users/travis/build/MacPython/h5py-wheels/h5py/h5py/_objects.c:2687)()

h5py/_objects.pyx in h5py._objects.with_phil.wrapper (/Users/travis/build/MacPython/h5py-wheels/h5py/h5py/_objects.c:2645)()

/usr/local/lib/python3.5/site-packages/h5py/_hl/group.py in __getitem__(self, name)
    164                 raise ValueError("Invalid HDF5 object reference")
    165         else:
--> 166             oid = h5o.open(self.id, self._e(name), lapl=self._lapl)
    167 
    168         otype = h5i.get_type(oid)

h5py/_objects.pyx in h5py._objects.with_phil.wrapper (/Users/travis/build/MacPython/h5py-wheels/h5py/h5py/_objects.c:2687)()

h5py/_objects.pyx in h5py._objects.with_phil.wrapper (/Users/travis/build/MacPython/h5py-wheels/h5py/h5py/_objects.c:2645)()

h5py/h5o.pyx in h5py.h5o.open (/Users/travis/build/MacPython/h5py-wheels/h5py/h5py/h5o.c:3573)()

KeyError: "Unable to open object (Object 'dset49001real' doesn't exist)"

In [2]:
file.close()
15000*1e6*8/1024**2


Out[2]:
114440.91796875

In [51]:
import numpy as np 
import matplotlib.pyplot as plt
import matplotlib as mpl
import h5py
import cmath

from matplotlib import rc
rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']})
## for Palatino and other serif fonts use:
#rc('font',**{'family':'serif','serif':['Palatino']})
rc('text', usetex=True)


plt.rc('font', family='serif')
plt.rc('xtick', labelsize=30)
plt.rc('ytick', labelsize=30)

cmap = plt.get_cmap('jet_r')
c1 = "red"#cmap(0)
c2 = cmap(130)


mpl.rcParams["mathtext.fontset"] = "stix"
#%matplotlib inline
fig = plt.figure(figsize=(15,8))
ax = fig.add_subplot(221)
floc = "../../build/instability_origin.h5"
file = h5py.File(floc)




t=1
dstr =  "/dset"+str(t)
r = "real"
im = "img"
#e = (dstr+r) in file
#print(e)
dsetr = np.array(file[dstr+r])
dseti = np.array(file[dstr+im])
param = np.array(file["/params"])

nx = param[4]

x = np.linspace(param[1],param[0],param[4])


#ax.plot(x, dsetr, label = "$\mathrm{Re}\{ \psi_n \} \ numerical $",linewidth=3,c=c1)
#ax.plot(x, dseti, label = "$\mathrm{Im}\{ \psi_n \} \ numerical $",linewidth=3,c=c2)

#plt.legend(loc="best",prop={'size':18},frameon=False)
#ax.plot(x, dsetr**2+dseti**2, label = "$|\psi(x)|^2 \ numerical$")
i = 0
dstr =  "/dset"+str(i)
dsetr2 = np.array(file[dstr+r])
dseti2 = np.array(file[dstr+im])
E = param[-1]
#E = -1.0
dt = (param[2] - param[3])/param[5]
psi = dsetr2 + 1j * dseti2

i =  0
#i = np.int32(np.pi/(dt*E))


print(i)
t -= 1
i = t
U = np.exp( -1j* E * i * dt)
#U = -np.sin(E*t*dt)

#ax.plot(x,psi.real, label = "$\mathrm{Re}\{\psi_{n}\} \ analytical$")
print(U)
#ax.plot(x, psi.imag, label = "$\mathrm{Im}\{ \psi_n \} \ initial $")
psi = psi*U

print(param)



#ax.plot(x, np.abs(psi.imag-dseti), "o",label = " $\Delta \mathfrak{Im}\{\psi_n\}$")
#ax.plot(x,psi.real, label = "$\mathrm{Re}\{\psi_{n}\} \ analytical$",linewidth=1, c="red")
#ax.plot(x, psi.imag, label = "$\mathrm{Im}\{ \psi_n \} \ analytical $",linewidth=1, c="purple")
#ax.plot(x, psi.real**2+psi.imag**2, label="$|\psi_n|^2 \ analytical$")

ax.plot(x, dseti,label="$\mathrm{Im}\{\psi_{num}\}$",
       linewidth=3, c="red")
ax.plot(x, psi.imag,label="$\mathrm{Im}\{\psi_{an}\}$"
        ,linewidth=3,c=cmap(178))
#ax.set_xlabel("$x \ (a.u)$", size = 30)
ax.set_ylabel("$ \psi_n(x)$", size = 30)
ax.text(9.28,0.009,"a) $t_j = t_{"+str(i)+"}$",size = 30)
plt.legend(loc='best',frameon=False, prop={'size':30})


ax = fig.add_subplot(222)
t=1001
dstr =  "/dset"+str(t)
r = "real"
im = "img"
#e = (dstr+r) in file
#print(e)
dsetr = np.array(file[dstr+r])
dseti = np.array(file[dstr+im])
param = np.array(file["/params"])

nx = param[4]

x = np.linspace(param[1],param[0],param[4])


#ax.plot(x, dsetr, label = "$\mathrm{Re}\{ \psi_n \} \ numerical $",linewidth=3,c=c1)
#ax.plot(x, dseti, label = "$\mathrm{Im}\{ \psi_n \} \ numerical $",linewidth=3,c=c2)

#plt.legend(loc="best",prop={'size':18},frameon=False)
#ax.plot(x, dsetr**2+dseti**2, label = "$|\psi(x)|^2 \ numerical$")
i = 0
dstr =  "/dset"+str(i)
dsetr2 = np.array(file[dstr+r])
dseti2 = np.array(file[dstr+im])
E = param[-1]
#E = -1.0
dt = (param[2] - param[3])/param[5]
psi = dsetr2 + 1j * dseti2

i =  0
#i = np.int32(np.pi/(dt*E))


print(i)
t -= 1
i = t
U = np.exp( -1j* E * i * dt)
#U = -np.sin(E*t*dt)

#ax.plot(x,psi.real, label = "$\mathrm{Re}\{\psi_{n}\} \ analytical$")
print(U)
#ax.plot(x, psi.imag, label = "$\mathrm{Im}\{ \psi_n \} \ initial $")
psi = psi*U

print(param)



#ax.plot(x, np.abs(psi.imag-dseti), "o",label = " $\Delta \mathfrak{Im}\{\psi_n\}$")
#ax.plot(x,psi.real, label = "$\mathrm{Re}\{\psi_{n}\} \ analytical$",linewidth=1, c="red")
#ax.plot(x, psi.imag, label = "$\mathrm{Im}\{ \psi_n \} \ analytical $",linewidth=1, c="purple")
#ax.plot(x, psi.real**2+psi.imag**2, label="$|\psi_n|^2 \ analytical$")

ax.plot(x, dseti,label="$\mathrm{Im}\{\psi_{num}\}$",
       linewidth=3, c="red")
ax.plot(x, psi.imag,label="$\mathrm{Im}\{\psi_{an}\}$"
        ,linewidth=3,c=cmap(178))
ax.text(9.23,0.3,"b) $t_j = t_{"+str(i)+"}$",size = 30)
#ax.set_xlabel("$x \ (a.u)$", size = 18)
#ax.set_ylabel("$\Delta \psi_n(x)$", size = 18)
#ax.set_title("Norm of errors at $t_j = t_{"+str(i)+"}$ with $ \Delta t ="+str(dt)+"$",
#          size = 15, y = 1.05)

plt.legend(loc='best',frameon=False, prop={'size':30})


ax = fig.add_subplot(223)
t=1501
dstr =  "/dset"+str(t)
r = "real"
im = "img"
#e = (dstr+r) in file
#print(e)
dsetr = np.array(file[dstr+r])
dseti = np.array(file[dstr+im])
param = np.array(file["/params"])

nx = param[4]

x = np.linspace(param[1],param[0],param[4])


#ax.plot(x, dsetr, label = "$\mathrm{Re}\{ \psi_n \} \ numerical $",linewidth=3,c=c1)
#ax.plot(x, dseti, label = "$\mathrm{Im}\{ \psi_n \} \ numerical $",linewidth=3,c=c2)

#plt.legend(loc="best",prop={'size':18},frameon=False)
#ax.plot(x, dsetr**2+dseti**2, label = "$|\psi(x)|^2 \ numerical$")
i = 0
dstr =  "/dset"+str(i)
dsetr2 = np.array(file[dstr+r])
dseti2 = np.array(file[dstr+im])
E = param[-1]
#E = -1.0
dt = (param[2] - param[3])/param[5]
psi = dsetr2 + 1j * dseti2

i =  0
#i = np.int32(np.pi/(dt*E))


print(i)
t -= 1
i = t
U = np.exp( -1j* E * i * dt)
#U = -np.sin(E*t*dt)

#ax.plot(x,psi.real, label = "$\mathrm{Re}\{\psi_{n}\} \ analytical$")
print(U)
#ax.plot(x, psi.imag, label = "$\mathrm{Im}\{ \psi_n \} \ initial $")
psi = psi*U

print(param)



#ax.plot(x, np.abs(psi.imag-dseti), "o",label = " $\Delta \mathfrak{Im}\{\psi_n\}$")
#ax.plot(x,psi.real, label = "$\mathrm{Re}\{\psi_{n}\} \ analytical$",linewidth=1, c="red")
#ax.plot(x, psi.imag, label = "$\mathrm{Im}\{ \psi_n \} \ analytical $",linewidth=1, c="purple")
#ax.plot(x, psi.real**2+psi.imag**2, label="$|\psi_n|^2 \ analytical$")

ax.plot(x, dseti,label="$\mathrm{Im}\{\psi_{num}\}$",
       linewidth=3, c="red")
ax.plot(x, psi.imag,label="$\mathrm{Im}\{\psi_{an}\}$"
        ,linewidth=3,c=cmap(178))
ax.set_xlabel("$x \ (a.u)$", size = 30)
ax.set_ylabel("$\psi_n(x)$", size = 30)

ax.text(9.25,0.3,"c) $t_j = t_{"+str(i)+"}$",size = 30)
#ax.set_title("Norm of errors at $t_j = t_{"+str(i)+"}$ with $ \Delta t ="+str(dt)+"$",
#          size = 15, y = 1.05)


plt.legend(loc='best',frameon=False, prop={'size':30})

ax = fig.add_subplot(224)
t=2001
dstr =  "/dset"+str(t)
r = "real"
im = "img"
#e = (dstr+r) in file
#print(e)
dsetr = np.array(file[dstr+r])
dseti = np.array(file[dstr+im])
param = np.array(file["/params"])

nx = param[4]

x = np.linspace(param[1],param[0],param[4])


#ax.plot(x, dsetr, label = "$\mathrm{Re}\{ \psi_n \} \ numerical $",linewidth=3,c=c1)
#ax.plot(x, dseti, label = "$\mathrm{Im}\{ \psi_n \} \ numerical $",linewidth=3,c=c2)

#plt.legend(loc="best",prop={'size':18},frameon=False)
#ax.plot(x, dsetr**2+dseti**2, label = "$|\psi(x)|^2 \ numerical$")
i = 0

dstr =  "/dset"+str(i)
dsetr2 = np.array(file[dstr+r])
dseti2 = np.array(file[dstr+im])
E = param[-1]
#E = -1.0
dt = (param[2] - param[3])/param[5]
psi = dsetr2 + 1j * dseti2

i =  0
#i = np.int32(np.pi/(dt*E))


print(i)
t -= 1
i = t
U = np.exp( -1j* E * i * dt)
#U = -np.sin(E*t*dt)

#ax.plot(x,psi.real, label = "$\mathrm{Re}\{\psi_{n}\} \ analytical$")
print(U)
#ax.plot(x, psi.imag, label = "$\mathrm{Im}\{ \psi_n \} \ initial $")
psi = psi*U

print(param)



#ax.plot(x, np.abs(psi.imag-dseti), "o",label = " $\Delta \mathfrak{Im}\{\psi_n\}$")
#ax.plot(x,psi.real, label = "$\mathrm{Re}\{\psi_{n}\} \ analytical$",linewidth=1, c="red")
#ax.plot(x, psi.imag, label = "$\mathrm{Im}\{ \psi_n \} \ analytical $",linewidth=1, c="purple")
#ax.plot(x, psi.real**2+psi.imag**2, label="$|\psi_n|^2 \ analytical$")

ax.plot(x, dseti,label="$\mathrm{Im}\{\psi_{num}\}$",
       linewidth=3, c="red")
ax.plot(x, psi.imag,label="$\mathrm{Im}\{\psi_{an}\}$"
        ,linewidth=3,c=cmap(178))
ax.text(9.25,0.24,"d) $t_j = t_{"+str(i)+"}$",size = 30)
ax.set_xlabel("$x \ (a.u)$", size = 30)
#ax.set_ylabel("$\Delta \psi_n(x)$", size = 18)
#ax.set_title("Norm of errors at $t_j = t_{"+str(i)+"}$ with $ \Delta t ="+str(dt)+"$",
#          size = 15, y = 1.05)
print(dt)


plt.legend(loc='best',frameon=False, prop={'size':30})
#plt.tight_layout()
plt.show()


0
(1+0j)
[  1.50000000e+01   0.00000000e+00   5.00000000e+03   0.00000000e+00
   1.00000000e+03   1.00000000e+05   1.00000000e+00  -2.74891100e-01]
0
(0.382602923547+0.923912876246j)
[  1.50000000e+01   0.00000000e+00   5.00000000e+03   0.00000000e+00
   1.00000000e+03   1.00000000e+05   1.00000000e+00  -2.74891100e-01]
0
(-0.195218519594+0.980759771609j)
[  1.50000000e+01   0.00000000e+00   5.00000000e+03   0.00000000e+00
   1.00000000e+03   1.00000000e+05   1.00000000e+00  -2.74891100e-01]
0
(-0.707230005787+0.706983535108j)
[  1.50000000e+01   0.00000000e+00   5.00000000e+03   0.00000000e+00
   1.00000000e+03   1.00000000e+05   1.00000000e+00  -2.74891100e-01]
0.05

In [47]:
from matplotlib import rc
rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']})
## for Palatino and other serif fonts use:
#rc('font',**{'family':'serif','serif':['Palatino']})
rc('text', usetex=True)


plt.rc('font', family='serif')
plt.rc('xtick', labelsize='xx-large')
plt.rc('ytick', labelsize='xx-large')



t  = np.linspace(0,3000,10000)

x1 = 1000*np.sin(7*np.pi/3000*t-np.pi)*np.exp(-(t-1500)**2*2.2e-6)
#x1 = np.sin(3*(t-5))/(3*(t-5))

plt.plot(t,x1,label="Time disturbance",linewidth=2)
plt.xlabel("$t \ (a.u.)$",size=30)
plt.ylabel("$E(t) (a.u.)$",size=30)
plt.legend(frameon=False,prop={'size':30})
plt.show()

In [2]:
import matplotlib.pyplot as plt 
import numpy as np


0.0017328679514

In [1]:
import matplotlib.pyplot as plt 
import numpy as np
from matplotlib import rc
rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']})
## for Palatino and other serif fonts use:
#rc('font',**{'family':'serif','serif':['Palatino']})
rc('text', usetex=True)


plt.rc('font', family='serif')
plt.rc('xtick', labelsize=30)
plt.rc('ytick', labelsize=30)

a = np.log(2)/(1500-2500)**2
print("a = "+str(a))
b = np.log(2)/(10)**2
print("b = "+ str(b))
#t = np.linspace(0, 1000, 1e3)
x = np.linspace(-30, 30, 1e3)

t0 = 2500
x0 = 0
I = 1
k = 2*np.pi/(10000)
w = k*137
print("w = "+str(w))


t1 = 2500
st = np.sin(w*t1-k*x)*np.exp(-b*x**2)

et = np.exp(-a*(t1-t0)**2)
plt.xlabel(r"$x \ (a.u.)$", size=40)
plt.ylabel(r"$V(x,t) \ (a.u.)$", size=40)
wave = st#*et
p = plt.plot(x, wave, label="disturbance $V_1(x)$",c="b",linewidth=2)

plt.ylim([-0.5,1.1])

dt = 1
t1 = 1000
    
for i  in range(0, 1000):
    if t1 >= 700:
        dt = 1
    
    if t1 >= 3000:
        dt = 1
    
    t1+=dt
    plt.title("Laser field at t = \ $"+str(t1)+" \ (a.u.)$",size=40)
    et = np.sin(w*t1-k*x)*np.exp(-b*x**2)*np.exp(-a*(t1-t0)**2)
    plt.setp(p[0], ydata=et)
    plt.draw()
    plt.pause(0.01)

plt.legend(frameon=False,loc='best',prop={'size':40})
plt.show()


a = 6.9314718056e-07
b = 0.0069314718056
w = 0.08607963870836033
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-1-628342c1d6cf> in <module>()
     53     plt.setp(p[0], ydata=et)
     54     plt.draw()
---> 55     plt.pause(0.01)
     56 
     57 plt.legend(frameon=False,loc='best',prop={'size':40})

/home/boehme03/.local/lib/python3.4/site-packages/matplotlib/pyplot.py in pause(interval)
    287             canvas = figManager.canvas
    288             if canvas.figure.stale:
--> 289                 canvas.draw()
    290             show(block=False)
    291             canvas.start_event_loop(interval)

/home/boehme03/.local/lib/python3.4/site-packages/matplotlib/backends/backend_qt5agg.py in draw(self)
    156         # The Agg draw is done here; delaying causes problems with code that
    157         # uses the result of the draw() to update plot elements.
--> 158         FigureCanvasAgg.draw(self)
    159         self.update()
    160 

/home/boehme03/.local/lib/python3.4/site-packages/matplotlib/backends/backend_agg.py in draw(self)
    472 
    473         try:
--> 474             self.figure.draw(self.renderer)
    475         finally:
    476             RendererAgg.lock.release()

/home/boehme03/.local/lib/python3.4/site-packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs)
     59     def draw_wrapper(artist, renderer, *args, **kwargs):
     60         before(artist, renderer)
---> 61         draw(artist, renderer, *args, **kwargs)
     62         after(artist, renderer)
     63 

/home/boehme03/.local/lib/python3.4/site-packages/matplotlib/figure.py in draw(self, renderer)
   1157         dsu.sort(key=itemgetter(0))
   1158         for zorder, a, func, args in dsu:
-> 1159             func(*args)
   1160 
   1161         renderer.close_group('figure')

/home/boehme03/.local/lib/python3.4/site-packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs)
     59     def draw_wrapper(artist, renderer, *args, **kwargs):
     60         before(artist, renderer)
---> 61         draw(artist, renderer, *args, **kwargs)
     62         after(artist, renderer)
     63 

/home/boehme03/.local/lib/python3.4/site-packages/matplotlib/axes/_base.py in draw(self, renderer, inframe)
   2322 
   2323         for zorder, a in dsu:
-> 2324             a.draw(renderer)
   2325 
   2326         renderer.close_group('axes')

/home/boehme03/.local/lib/python3.4/site-packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs)
     59     def draw_wrapper(artist, renderer, *args, **kwargs):
     60         before(artist, renderer)
---> 61         draw(artist, renderer, *args, **kwargs)
     62         after(artist, renderer)
     63 

/home/boehme03/.local/lib/python3.4/site-packages/matplotlib/axis.py in draw(self, renderer, *args, **kwargs)
   1109 
   1110         for tick in ticks_to_draw:
-> 1111             tick.draw(renderer)
   1112 
   1113         # scale up the axis label box to also find the neighbors, not

/home/boehme03/.local/lib/python3.4/site-packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs)
     59     def draw_wrapper(artist, renderer, *args, **kwargs):
     60         before(artist, renderer)
---> 61         draw(artist, renderer, *args, **kwargs)
     62         after(artist, renderer)
     63 

/home/boehme03/.local/lib/python3.4/site-packages/matplotlib/axis.py in draw(self, renderer)
    250 
    251         if self.label1On:
--> 252             self.label1.draw(renderer)
    253         if self.label2On:
    254             self.label2.draw(renderer)

/home/boehme03/.local/lib/python3.4/site-packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs)
     59     def draw_wrapper(artist, renderer, *args, **kwargs):
     60         before(artist, renderer)
---> 61         draw(artist, renderer, *args, **kwargs)
     62         after(artist, renderer)
     63 

/home/boehme03/.local/lib/python3.4/site-packages/matplotlib/text.py in draw(self, renderer)
    790                     textrenderer.draw_tex(gc, x, y, clean_line,
    791                                           textobj._fontproperties, angle,
--> 792                                           mtext=mtext)
    793                 else:
    794                     textrenderer.draw_text(gc, x, y, clean_line,

/home/boehme03/.local/lib/python3.4/site-packages/matplotlib/backends/backend_agg.py in draw_tex(self, gc, x, y, s, prop, angle, ismath, mtext)
    251         texmanager = self.get_texmanager()
    252 
--> 253         Z = texmanager.get_grey(s, size, self.dpi)
    254         Z = np.array(Z * 255.0, np.uint8)
    255 

/home/boehme03/.local/lib/python3.4/site-packages/matplotlib/texmanager.py in get_grey(self, tex, fontsize, dpi)
    581 
    582         if alpha is None:
--> 583             pngfile = self.make_png(tex, fontsize, dpi)
    584             X = read_png(os.path.join(self.texcache, pngfile))
    585 

/home/boehme03/.local/lib/python3.4/site-packages/matplotlib/texmanager.py in make_png(self, tex, fontsize, dpi)
    522                     'dvipng was not able to process the following '
    523                     'file:\n%s\nHere is the full report generated by '
--> 524                     'dvipng: \n\n' % dvifile + report)
    525             else:
    526                 mpl.verbose.report(report, 'debug')

RuntimeError: dvipng was not able to process the following file:
/home/boehme03/.cache/matplotlib/tex.cache/a0782d4d9369e9f01522c46c5aad9580.dvi
Here is the full report generated by dvipng: 


In [2]:
print(2*np.pi/w)


72.99270072992701

In [ ]: