GPUE  v1.0
GPU Gross-Pitaevskii Equation numerical solver for Bose-Einstein condensates
observables Namespace Reference

Functions

def kinertrum (Psi, dx, i, quOn)
 Kinetic energy spectrum = kinertrum. More...
 
def kinertrum_loop (dataName, initValue, finalValue, incr)
 
def dens_struct_fact (dataName, initValue, finalValue, incr)
 
def energy_total (dataName, initValue, finalValue, increment)
 
def energy_kinetic (dataName, initValue, finalValue, increment)
 
def energy_potential (dataName, initValue, finalValue, increment)
 
def ang_mom (dataName, initValue, finalValue, incr, ev_type, imgdpi)
 
def expec_val_monopole (dataName, initValue, finalValue, incr)
 
def expec_val_quadrupole (dataName, initValue, finalValue, incr)
 
def expec_val_ (quant_name, quantity, dataName, initValue, finalValue, incr)
 

Variables

float HBAR = 1.05457148e-34
 
float PI = 3.141592653589793
 
 prec
 
 c = ConfigParser.ConfigParser()
 
 xDim = int(c.getfloat('Params','xDim'))
 
 yDim = int(c.getfloat('Params','yDim'))
 
 gndMaxVal = int(c.getfloat('Params','gsteps'))
 
 evMaxVal = int(c.getfloat('Params','esteps'))
 
 incr = int(c.getfloat('Params','print_out'))
 
tuple dx = (c.getfloat('Params','dx'))
 
tuple dy = (c.getfloat('Params','dy'))
 
tuple dkx = (c.getfloat('Params','dpx'))
 
tuple dky = (c.getfloat('Params','dpy'))
 
tuple dt = (c.getfloat('Params','dt'))
 
tuple xMax = (c.getfloat('Params','xMax'))
 
tuple yMax = (c.getfloat('Params','yMax'))
 
tuple omegaZ = (c.getfloat('Params','omegaZ'))
 
tuple mass = (c.getfloat('Params','Mass'))
 
tuple omega = (c.getfloat('Params','omega'))
 
tuple omegaX = (c.getfloat('Params','omegaX'))
 
 num_vort = int(c.getfloat('Params','Num_vort'))
 
 N = int(c.getfloat('Params','atoms'))
 
 data = numpy.ndarray(shape=(xDim,yDim))
 
 x = np.asarray(open('x_0').read().splitlines(),dtype='f8')
 
 y = np.asarray(open('y_0').read().splitlines(),dtype='f8')
 
 kx = np.reshape( np.array( [np.linspace( 0, (xDim/2-1)*dkx, xDim/2), np.linspace( (-xDim/2-1)*dkx, -dkx, xDim/2)]), (xDim,1) )
 
 ky = np.reshape( np.array( [np.linspace( 0, (yDim/2-1)*dky, yDim/2), np.linspace( (-yDim/2-1)*dky, -dky, yDim/2)]), (yDim,1) )
 
 kxm
 
 kym
 
 km_mag = np.sqrt( kxm**2 + kym**2 )
 
 k_mag = np.sqrt( kx**2 + ky**2 )
 
 kMax = max(max(k_mag))
 
float hbar = 1.05457e-34
 
float m = 1.4431607e-25
 
 V = np.array(open('V_0').read().splitlines(),dtype='f8')
 
 K = np.array(open('K_0').read().splitlines(),dtype='f8')
 
 xPy = np.array(open('xPy_0').read().splitlines(),dtype='f8')
 
 yPx = np.array(open('yPx_0').read().splitlines(),dtype='f8')
 
tuple g = (0.5*N)*4.0*HBAR*HBAR*PI*(4.67e-9/mass)*np.sqrt(mass*omegaZ/(2.0*PI*HBAR))
 

Detailed Description

observables.py - GPUE: Split Operator based GPU solver for Nonlinear 
Schrodinger Equation, Copyright (C) 2011-2015, Lee J. O'Riordan 
<loriordan@gmail.com>, Tadhg Morgan, Neil Crowley. All rights reserved.

Redistribution and use in source and binary forms, with or without 
modification, are permitted provided that the following conditions are 
met:

1. Redistributions of source code must retain the above copyright 
notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright 
notice, this list of conditions and the following disclaimer in the 
documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its 
contributors may be used to endorse or promote products derived from 
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Function Documentation

◆ ang_mom()

def observables.ang_mom (   dataName,
  initValue,
  finalValue,
  incr,
  ev_type,
  imgdpi 
)

Definition at line 293 of file observables.py.

Referenced by expec_val_().

293 def ang_mom(dataName, initValue, finalValue, incr, ev_type, imgdpi):
294  xm, ym = np.meshgrid(x,y)
295  pxm, pym = np.meshgrid(px,py)
296  dx2=dx**2
297  Lz = np.zeros( (finalValue/incr))
298  for i in range(initValue,incr*(finalValue/incr),incr):
299  if os.path.exists(dataName + '_' + str(i)):
300  real=open(dataName + '_' + str(i)).read().splitlines()
301  img=open(dataName + 'i_' + str(i)).read().splitlines()
302  a_r = numpy.asanyarray(real,dtype='f8') #64-bit double
303  a_i = numpy.asanyarray(img,dtype='f8') #64-bit double
304  a = a_r[:] + 1j*a_i[:]
305  wfc = np.reshape(a,(xDim,yDim))
306  conjwfc = np.conj(wfc)
307 
308  wfc_ypx = np.multiply(ym,np.fft.ifft(np.multiply(pxm,np.fft.fft(wfc,axis=1)),axis=1))
309  wfc_xpy = np.multiply(xm,np.fft.ifft(np.multiply(pym,np.fft.fft(wfc,axis=0)),axis=0))
310  result = np.sum( np.sum( np.multiply(conjwfc,wfc_xpy - wfc_ypx) ) )*dx2
311  else:
312  print "Skipped " + dataName + "_"+ str(i)
313  result = np.nan
314 
315  print i, incr
316  Lz[(i/incr)] = np.real(result)
317  type=""
318  if ev_type == 0:
319  type = "gnd"
320  else:
321  type = "ev"
322  np.savetxt('Lz.csv',Lz,delimiter=',')
323 
324  plt.plot(Lz)
325  plt.savefig("Lz_"+type+".pdf",dpi=imgdpi)
326  plt.axis('off')
327  plt.savefig("Lz_"+type+"_axis0.pdf",bbox_inches='tight',dpi=imgdpi)
328  plt.close()
329 
def ang_mom(dataName, initValue, finalValue, incr, ev_type, imgdpi)
Definition: observables.py:293
Here is the caller graph for this function:

◆ dens_struct_fact()

def observables.dens_struct_fact (   dataName,
  initValue,
  finalValue,
  incr 
)

Definition at line 194 of file observables.py.

References kinertrum().

Referenced by expec_val_().

194 def dens_struct_fact(dataName, initValue, finalValue,incr):
195  n_k=np.zeros(finalValue/incr)
196  n_k_t=np.zeros((finalValue/incr,xDim,yDim),dtype=np.complex128)
197  for i in range(initValue,incr*(finalValue/incr),incr):
198  if os.path.exists(dataName + '_' + str(i)):
199  real=open(dataName + '_' + str(i)).read().splitlines()
200  img=open(dataName + 'i_' + str(i)).read().splitlines()
201  a_r = numpy.asanyarray(real,dtype='f8') #64-bit double
202  a_i = numpy.asanyarray(img,dtype='f8') #64-bit double
203  a = a_r[:] + 1j*a_i[:]
204  n = np.abs(a)**2
205 
206  kinertrum(np.reshape(a,(xDim,yDim)),dx,i,0)
207  sf = np.fft.fftshift(np.fft.fft2(np.reshape(n,(xDim,yDim))))
208  n_k_t[i/incr][:][:] = sf[:][:];
209  n_k[i/incr]=(abs(np.sum(np.sum(sf))*dkx**2))
210 
211  fig, ax = plt.subplots()
212  f = plt.imshow(np.log10(abs(sf)),cmap=plt.get_cmap('gnuplot2'))
213  cbar = fig.colorbar(f)
214  plt.gca().invert_yaxis()
215  plt.savefig("struct_" + str(i/incr) + ".png",vmin=0,vmax=12,dpi=200)
216  plt.close()
217  print i/incr
218 
219  np.savetxt('Struct' + '.csv',n_k,delimiter=',')
220  plt.plot(range(initValue,finalValue,incr),n_k)
221  sp.io.savemat('Struct_t.mat',mdict={'n_k_t',n_k_t})
222  plt.savefig("Struct.pdf",dpi=200)
223  plt.close()
224 
def dens_struct_fact(dataName, initValue, finalValue, incr)
Definition: observables.py:194
def kinertrum(Psi, dx, i, quOn)
Kinetic energy spectrum = kinertrum.
Definition: observables.py:104
Here is the call graph for this function:
Here is the caller graph for this function:

◆ energy_kinetic()

def observables.energy_kinetic (   dataName,
  initValue,
  finalValue,
  increment 
)

Definition at line 268 of file observables.py.

Referenced by expec_val_().

268 def energy_kinetic(dataName, initValue, finalValue, increment):
269  px1 = np.fft.fftshift(px)
270  py1 = np.fft.fftshift(py)
271  dk=[]
272  dk2[:] = (px1[:]**2 + py1[:]**2)
273  Lz = np.zeros( (finalValue/incr))
274  for i in range(initValue,incr*(finalValue/incr),incr):
275  if os.path.exists(dataName + '_' + str(i)):
276  real=open(dataName + '_' + str(i)).read().splitlines()
277  img=open(dataName + 'i_' + str(i)).read().splitlines()
278  a_r = numpy.asanyarray(real,dtype='f8') #64-bit double
279  a_i = numpy.asanyarray(img,dtype='f8') #64-bit double
280  a = a_r[:] + 1j*a_i[:]
281  wfcp = np.fft.fft2(np.reshape(a,(xDim,yDim)))
282  conjwfcp = np.conj(wfcp)
283  E_k = np.zeros(len(px1))
284  for ii in range(0,len(px1)):
285  E_k[ii] = np.sum( np.sum( np.multiply(wfcp,conjwfcp) ) )*dk2[ii]
286 
287  np.savetxt('E_k_' + str(i) + '.csv',E_k,delimiter=',')
288  print i
289 
def energy_kinetic(dataName, initValue, finalValue, increment)
Definition: observables.py:268
Here is the caller graph for this function:

◆ energy_potential()

def observables.energy_potential (   dataName,
  initValue,
  finalValue,
  increment 
)

Definition at line 290 of file observables.py.

290 def energy_potential(dataName, initValue, finalValue, increment):
291  print 'energy'
292 
def energy_potential(dataName, initValue, finalValue, increment)
Definition: observables.py:290

◆ energy_total()

def observables.energy_total (   dataName,
  initValue,
  finalValue,
  increment 
)

Definition at line 235 of file observables.py.

Referenced by expec_val_().

235 def energy_total(dataName, initValue, finalValue, increment):
236  E=np.zeros((finalValue,1))
237  E_k=np.zeros((finalValue,1))
238  E_vi=np.zeros((finalValue,1))
239  E_l=np.zeros((finalValue,1))
240  for i in range(initValue,incr*(finalValue/incr),incr):
241  if os.path.exists(dataName + '_' + str(i)):
242  real=open(dataName + '_' + str(i)).read().splitlines()
243  img=open(dataName + 'i_' + str(i)).read().splitlines()
244  a_r = np.array(real,dtype='f8') #64-bit double
245  a_i = np.array(img,dtype='f8') #64-bit double
246  wfcr = np.reshape(a_r[:] + 1j*a_i[:],(xDim,yDim))
247  wfcp = np.array(np.fft.fft2(wfcr))
248  wfcr_c = np.conj(wfcr)
249 
250  E1 = np.fft.ifft2(K*wfcp)
251  E2 = (V + 0.5*g*np.abs(wfcr)**2)*wfcr
252  E3 = -(omega*omegaX)*(np.fft.ifft(xPy*np.fft.fft(wfcr,axis=0),axis=0) - np.fft.ifft(yPx*np.fft.fft(wfcr,axis=1),axis=1) )
253 
254  E_k[i/incr] = np.trapz(np.trapz(wfcr_c*E1))*dx*dy
255  E_vi[i/incr] = np.trapz(np.trapz(wfcr_c*E2))*dx*dy
256  E_l[i/incr] = np.trapz(np.trapz(wfcr_c*E3))*dx*dy
257  E[i/incr] = E_k[i/incr] + E_vi[i/incr] + E_l[i/incr]
258  print (i/float(evMaxVal))
259  np.savetxt('E_'+ str(i) + '.csv',E,delimiter=',')
260  np.savetxt('E_k_'+ str(i) + '.csv',E_k,delimiter=',')
261  np.savetxt('E_vi_'+ str(i) + '.csv',E_vi,delimiter=',')
262  np.savetxt('E_l_'+ str(i) + '.csv',E_l,delimiter=',')
263  t = np.array(range(initValue,finalValue,incr))/dt
264  plt.plot(t,E,'r-',t,E_k,'g-',t,E_vi,'b-',t,E_l,'y-')
265  plt.savefig("EnergyVst.pdf",dpi=200)
266  plt.close()
267 
def energy_total(dataName, initValue, finalValue, increment)
Definition: observables.py:235
Here is the caller graph for this function:

◆ expec_val_()

def observables.expec_val_ (   quant_name,
  quantity,
  dataName,
  initValue,
  finalValue,
  incr 
)

Definition at line 382 of file observables.py.

References ang_mom(), dens_struct_fact(), energy_kinetic(), energy_total(), expec_val_monopole(), expec_val_quadrupole(), and kinertrum_loop().

382 def expec_val_(quant_name, quantity, dataName, initValue, finalValue, incr):
383  x=np.asarray(open('x_0').read().splitlines(),dtype='f8')
384  y=np.asarray(open('y_0').read().splitlines(),dtype='f8')
385  xm, ym = np.meshgrid(x, y)
386  result = []
387  for i in range(initValue,finalValue,incr):
388  if not os.path.exists(dataName):
389  real=open(dataName + '_' + str(i)).read().splitlines()
390  img=open(dataName + 'i_' + str(i)).read().splitlines()
391  a_r = numpy.asanyarray(real,dtype='f8') #64-bit double
392  a_i = numpy.asanyarray(img,dtype='f8') #64-bit double
393  a = a_r[:] + 1j*a_i[:]
394  wfc = np.reshape(a,(xDim,yDim))
395  conjwfc = np.conj(wfc)
396 
397  d1 = np.multiply( quantity, wfc )
398  d2 = np.multiply( conjwfc, d1)
399  result.append( np.real( np.sum( np.sum( d2 ) ) )*dx*dx )
400  print str(100*float(i)/finalValue) + '%'
401  np.savetxt(quant_name + '.csv',result,delimiter=',')
402  plt.plot(range(initValue,finalValue,incr),result)
403  plt.savefig(quant_name + ".pdf",dpi=200)
404  plt.close()
405 
def expec_val_(quant_name, quantity, dataName, initValue, finalValue, incr)
Definition: observables.py:382
Here is the call graph for this function:

◆ expec_val_monopole()

def observables.expec_val_monopole (   dataName,
  initValue,
  finalValue,
  incr 
)

Definition at line 330 of file observables.py.

Referenced by expec_val_().

330 def expec_val_monopole(dataName, initValue, finalValue, incr):
331  x=np.asarray(open('x_0').read().splitlines(),dtype='f8')
332  y=np.asarray(open('y_0').read().splitlines(),dtype='f8')
333 # px=open('px_0')
334 # py=open('py_0')
335  xm, ym = np.meshgrid(x, y)
336  result = []
337  for i in range(initValue,finalValue,incr):
338  if not os.path.exists(dataName):
339  real=open(dataName + '_' + str(i)).read().splitlines()
340  img=open(dataName + 'i_' + str(i)).read().splitlines()
341  a_r = numpy.asanyarray(real,dtype='f8') #64-bit double
342  a_i = numpy.asanyarray(img,dtype='f8') #64-bit double
343  a = a_r[:] + 1j*a_i[:]
344  wfc = np.reshape(a,(xDim,yDim))
345  conjwfc = np.conj(wfc)
346 
347  d1 = np.multiply( np.square(xm) + np.square(ym), wfc )
348  d2 = np.multiply( conjwfc, d1)
349  result.append( np.real( np.sum( np.sum( d2 ) ) )*dx*dx )
350  print str(100*float(i)/finalValue) + '%'
351  np.savetxt('monopole.csv',result,delimiter=',')
352  plt.plot(range(initValue,finalValue,incr),result)
353  plt.savefig("Monopole.png",dpi=200)
354  plt.close()
355 
def expec_val_monopole(dataName, initValue, finalValue, incr)
Definition: observables.py:330
Here is the caller graph for this function:

◆ expec_val_quadrupole()

def observables.expec_val_quadrupole (   dataName,
  initValue,
  finalValue,
  incr 
)

Definition at line 356 of file observables.py.

Referenced by expec_val_().

356 def expec_val_quadrupole(dataName, initValue, finalValue, incr):
357  x=np.asarray(open('x_0').read().splitlines(),dtype='f8')
358  y=np.asarray(open('y_0').read().splitlines(),dtype='f8')
359 # px=open('px_0')
360 # py=open('py_0')
361  xm, ym = np.meshgrid(x, y)
362  result = []
363  for i in range(initValue,finalValue,incr):
364  if not os.path.exists(dataName):
365  real=open(dataName + '_' + str(i)).read().splitlines()
366  img=open(dataName + 'i_' + str(i)).read().splitlines()
367  a_r = numpy.asanyarray(real,dtype='f8') #64-bit double
368  a_i = numpy.asanyarray(img,dtype='f8') #64-bit double
369  a = a_r[:] + 1j*a_i[:]
370  wfc = np.reshape(a,(xDim,yDim))
371  conjwfc = np.conj(wfc)
372 
373  d1 = np.multiply( np.square(xm) - np.square(ym), wfc )
374  d2 = np.multiply( conjwfc, d1)
375  result.append( np.real( np.sum( np.sum( d2 ) ) )*dx*dx )
376  print str(100*float(i)/finalValue) + '%'
377  np.savetxt('quadrupole.csv',result,delimiter=',')
378  plt.plot(range(initValue,finalValue,incr),result)
379  plt.savefig("Quadrupole.png",dpi=200)
380  plt.close()
381 
def expec_val_quadrupole(dataName, initValue, finalValue, incr)
Definition: observables.py:356
Here is the caller graph for this function:

◆ kinertrum()

def observables.kinertrum (   Psi,
  dx,
  i,
  quOn 
)

Kinetic energy spectrum = kinertrum.

Calculates the spectrum for compressible and incompressible kinetic energies.

Parameters
PsiThe wavefunction
dxIncrement along x
iThe current step number
quOnBoolean to turn on quantum kinetic energy spectrum (includes phase term).

Definition at line 104 of file observables.py.

Referenced by dens_struct_fact(), and kinertrum_loop().

104 def kinertrum(Psi, dx, i, quOn):
105 
106  kMax = np.max(np.max(kx))
107  Psi[np.where(Psi==0)] = 1e-100
108  n_r = np.abs(Psi)**2
109  n_r[np.where(n_r==0)] = 1e-100
110  cPsi = np.conj(Psi)
111  phi = np.angle(Psi)
112 
113  ph1 = np.unwrap(phi, axis=0)
114  ph2 = np.unwrap(phi, axis=1)
115 
116  vel_ph1_x, vel_ph1_y = np.gradient(ph1,dx,dy)
117  vel_ph2_x, vel_ph2_y = np.gradient(ph2,dx,dy)
118 
119  v_x = (hbar/m)*vel_ph1_x;
120  v_y = (hbar/m)*vel_ph2_y;
121  v_x[np.where(v_x==0)] = 1e-100
122  v_y[np.where(v_y==0)] = 1e-100
123 
124  u_x = np.multiply(np.abs(Psi),v_x)
125  u_y = np.multiply(np.abs(Psi),v_y)
126 
127  if quOn:
128  u_x = np.multiply(u_x,np.exp(1j*np.angle(Psi)))
129  u_y = np.multiply(u_y,np.exp(1j*np.angle(Psi)))
130 
131  u_kx = np.fft.fftn(u_x)
132  u_ky = np.fft.fftn(u_y)
133 
134  uc_kx = ( kxm**2*u_kx + kxm*kym*u_ky ) / ( km_mag**2 + 1e-100 )
135  uc_ky = ( kym*kxm*u_kx + kym**2*u_ky ) / ( km_mag**2 + 1e-100 )
136 
137  ui_kx = u_kx - uc_kx
138  ui_ky = u_ky - uc_ky
139 
140  uc_x = np.fft.ifftn(uc_kx)
141  uc_y = np.fft.ifftn(uc_ky)
142  ui_x = np.fft.ifftn(ui_kx)
143  ui_y = np.fft.ifftn(ui_ky)
144 
145  Ec = 0.5*np.abs(np.square(uc_x) + np.square(uc_y))
146  Ei = 0.5*np.abs(np.square(ui_x) + np.square(ui_y))
147 
148  fig, ax = plt.subplots()
149  f = plt.imshow((Ec),cmap=plt.get_cmap('gnuplot2'))
150  cbar = fig.colorbar(f)
151  plt.gca().invert_yaxis()
152  plt.savefig("Ec_" + str(i/incr) + ".png",dpi=200)
153  plt.close()
154  fig, ax = plt.subplots()
155  f = plt.imshow((Ei),cmap=plt.get_cmap('gnuplot2'))
156  cbar = fig.colorbar(f)
157  plt.gca().invert_yaxis()
158  plt.savefig("Ei_" + str(i/incr) + ".png",dpi=200)
159  plt.close()
160 
161  print Ec
162  #exit()
163  ekc = np.zeros((xDim/2-1,1))
164  eki = np.zeros((xDim/2-1,1))
165  for i1 in np.arange(0,np.size(k_mag)/2 -2):
166  iX = np.array(np.where(np.logical_and( k_mag[i1] >= km_mag, k_mag[i1+1] < km_mag )))
167 # Ei_kx = np.sum(np.sum(np.abs(ui_kx[iX]**2*k[iX]))
168 # Ei_ky = np.sum(np.sum(np.abs(ui_ky[iX]**2*k[iX]))
169  ekc[i1] = (0.5*m*k_mag[i1]) * (np.sum(np.abs(uc_kx[iX]**2 + uc_ky[iX]**2)))/len(iX)
170  eki[i1] = (0.5*m*k_mag[i1]) * (np.sum(np.abs(ui_kx[iX]**2 + ui_ky[iX]**2)))/len(iX)
171  print i1
172  np.savetxt('ekc_' + str(i) + '.csv',ekc,delimiter=',')
173  np.savetxt('eki_' + str(i) + '.csv',eki,delimiter=',')
174  fig, ax = plt.subplots()
175  print eki[0:(xDim/2-2)]
176  f = plt.loglog(np.ravel(k_mag[0:(xDim/2 -2)]),eki[0:(xDim/2-2)])
177  plt.savefig("eki_" + str(i) + ".png",dpi=200)
178  f = plt.loglog(np.ravel(k_mag[0:(xDim/2 -2)]),np.ravel(ekc[0:(xDim/2-2)]))
179  plt.savefig("ekc_" + str(i) + ".png",dpi=200)
180  plt.close()
181 
182 
def kinertrum(Psi, dx, i, quOn)
Kinetic energy spectrum = kinertrum.
Definition: observables.py:104
Here is the caller graph for this function:

◆ kinertrum_loop()

def observables.kinertrum_loop (   dataName,
  initValue,
  finalValue,
  incr 
)

Definition at line 183 of file observables.py.

References kinertrum().

Referenced by expec_val_().

183 def kinertrum_loop(dataName, initValue, finalValue, incr):
184  for i in range(initValue,incr*(finalValue/incr),incr):
185  if os.path.exists(dataName + '_' + str(i)):
186  real=open(dataName + '_' + str(i)).read().splitlines()
187  img=open(dataName + 'i_' + str(i)).read().splitlines()
188  a_r = numpy.asanyarray(real,dtype='f8') #64-bit double
189  a_i = numpy.asanyarray(img,dtype='f8') #64-bit double
190  a = a_r[:] + 1j*a_i[:]
191 
192  kinertrum(np.reshape(a,(xDim,yDim)),dx,i,1)
193 
def kinertrum_loop(dataName, initValue, finalValue, incr)
Definition: observables.py:183
def kinertrum(Psi, dx, i, quOn)
Kinetic energy spectrum = kinertrum.
Definition: observables.py:104
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ c

observables.c = ConfigParser.ConfigParser()

Definition at line 55 of file observables.py.

◆ data

observables.data = numpy.ndarray(shape=(xDim,yDim))

Definition at line 82 of file observables.py.

◆ dkx

tuple observables.dkx = (c.getfloat('Params','dpx'))

Definition at line 66 of file observables.py.

◆ dky

tuple observables.dky = (c.getfloat('Params','dpy'))

Definition at line 67 of file observables.py.

◆ dt

tuple observables.dt = (c.getfloat('Params','dt'))

Definition at line 68 of file observables.py.

◆ dx

tuple observables.dx = (c.getfloat('Params','dx'))

Definition at line 64 of file observables.py.

◆ dy

tuple observables.dy = (c.getfloat('Params','dy'))

Definition at line 65 of file observables.py.

◆ evMaxVal

observables.evMaxVal = int(c.getfloat('Params','esteps'))

Definition at line 61 of file observables.py.

◆ g

tuple observables.g = (0.5*N)*4.0*HBAR*HBAR*PI*(4.67e-9/mass)*np.sqrt(mass*omegaZ/(2.0*PI*HBAR))

Definition at line 233 of file observables.py.

◆ gndMaxVal

observables.gndMaxVal = int(c.getfloat('Params','gsteps'))

Definition at line 60 of file observables.py.

◆ HBAR

float observables.HBAR = 1.05457148e-34

Definition at line 51 of file observables.py.

◆ hbar

float observables.hbar = 1.05457e-34

Definition at line 96 of file observables.py.

◆ incr

observables.incr = int(c.getfloat('Params','print_out'))

Definition at line 62 of file observables.py.

◆ K

observables.K = np.array(open('K_0').read().splitlines(),dtype='f8')

Definition at line 227 of file observables.py.

◆ k_mag

observables.k_mag = np.sqrt( kx**2 + ky**2 )

Definition at line 93 of file observables.py.

◆ km_mag

observables.km_mag = np.sqrt( kxm**2 + kym**2 )

Definition at line 92 of file observables.py.

◆ kMax

observables.kMax = max(max(k_mag))

Definition at line 94 of file observables.py.

◆ kx

observables.kx = np.reshape( np.array( [np.linspace( 0, (xDim/2-1)*dkx, xDim/2), np.linspace( (-xDim/2-1)*dkx, -dkx, xDim/2)]), (xDim,1) )

Definition at line 89 of file observables.py.

◆ kxm

observables.kxm

Definition at line 91 of file observables.py.

◆ ky

observables.ky = np.reshape( np.array( [np.linspace( 0, (yDim/2-1)*dky, yDim/2), np.linspace( (-yDim/2-1)*dky, -dky, yDim/2)]), (yDim,1) )

Definition at line 90 of file observables.py.

◆ kym

observables.kym

Definition at line 91 of file observables.py.

◆ m

float observables.m = 1.4431607e-25

Definition at line 97 of file observables.py.

◆ mass

tuple observables.mass = (c.getfloat('Params','Mass'))

Definition at line 72 of file observables.py.

◆ N

observables.N = int(c.getfloat('Params','atoms'))

Definition at line 80 of file observables.py.

◆ num_vort

observables.num_vort = int(c.getfloat('Params','Num_vort'))

Definition at line 77 of file observables.py.

◆ omega

tuple observables.omega = (c.getfloat('Params','omega'))

Definition at line 73 of file observables.py.

◆ omegaX

tuple observables.omegaX = (c.getfloat('Params','omegaX'))

Definition at line 74 of file observables.py.

◆ omegaZ

tuple observables.omegaZ = (c.getfloat('Params','omegaZ'))

Definition at line 71 of file observables.py.

◆ PI

float observables.PI = 3.141592653589793

Definition at line 52 of file observables.py.

◆ prec

observables.prec

Definition at line 54 of file observables.py.

◆ V

observables.V = np.array(open('V_0').read().splitlines(),dtype='f8')

Definition at line 225 of file observables.py.

◆ x

observables.x = np.asarray(open('x_0').read().splitlines(),dtype='f8')

Definition at line 84 of file observables.py.

Referenced by latexFig().

◆ xDim

observables.xDim = int(c.getfloat('Params','xDim'))

Definition at line 58 of file observables.py.

◆ xMax

tuple observables.xMax = (c.getfloat('Params','xMax'))

Definition at line 69 of file observables.py.

◆ xPy

observables.xPy = np.array(open('xPy_0').read().splitlines(),dtype='f8')

Definition at line 229 of file observables.py.

◆ y

observables.y = np.asarray(open('y_0').read().splitlines(),dtype='f8')

Definition at line 85 of file observables.py.

Referenced by latexFig().

◆ yDim

observables.yDim = int(c.getfloat('Params','yDim'))

Definition at line 59 of file observables.py.

◆ yMax

tuple observables.yMax = (c.getfloat('Params','yMax'))

Definition at line 70 of file observables.py.

◆ yPx

observables.yPx = np.array(open('yPx_0').read().splitlines(),dtype='f8')

Definition at line 231 of file observables.py.