In [1]:
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline

Wavelength and Wavenumber

Let $j$ be the wave number, then $$ j = \frac{2\pi}{\tilde{\lambda}} $$ where $\tilde{\lambda}$ is the wavelength

A sinusoidal wave is expressed as $$ A \cos \left( \frac{2 \pi x}{\tilde{\lambda}} \right) $$

In [2]:
kdx = np.linspace(0, np.pi, 20) / np.pi
plt.plot(kdx, np.cos(2*np.pi*kdx / 0.001))
plt.plot(kdx, np.cos(2*np.pi*kdx / 1.0))
Out[2]:
[<matplotlib.lines.Line2D at 0x103be7a90>]
In [3]:
def ampFTBS(jhx, lmbda):
    return np.sqrt(1 - 2 * lmbda * (1 - lmbda) * (1 - np.cos(np.pi*jhx)))

def ampBTCS(jhx, lmbda):
    return 1 / np.sqrt(1 + lmbda**2 * np.sin(np.pi * jhx)**2)
In [4]:
jhx = np.linspace(0, np.pi, 100) / np.pi

#lmbdas = [0.1, 0.2, 0.4, 0.8, 0.9, 1.0, 1.2, 1.4, 1.8, 2.0]
lmbdas = [0.1, 0.2, 0.5, 0.6, 0.75, 0.9, 1.1]

for lmbda in lmbdas:
    
    plt.plot(jhx, ampFTBS(jhx, lmbda), label='%g'%lmbda, lw=4)
plt.legend()
plt.xlabel('$j h_x / \pi$', fontsize=24)
plt.ylabel('$|s(j)|$', fontsize=24)
Out[4]:
<matplotlib.text.Text at 0x103de63c8>

Dispersion

In [10]:
def alphaoverj(jhx, lmbda):
    return np.arctan((lmbda * np.sin(np.pi*jhx)) / (1 - lmbda + lmbda*np.cos(np.pi*jhx))) / (lmbda * np.pi * jhx)
In [11]:
jhx = np.linspace(0, np.pi, 100) / np.pi

#lmbdas = [0.1, 0.2, 0.4, 0.8, 0.9, 1.0, 1.2, 1.4, 1.8, 2.0]
lmbdas = [0.25, .33, 0.88]

for lmbda in lmbdas:
    plt.plot(jhx, alphaoverj(jhx, lmbda), label='%g' % lmbda)
plt.legend()
plt.xlabel('$j h_x / \pi$', fontsize=24)
/usr/local/lib/python3.5/site-packages/ipykernel/__main__.py:2: RuntimeWarning: invalid value encountered in true_divide
  from ipykernel import kernelapp as app
Out[11]:
<matplotlib.text.Text at 0x1041627f0>
In [ ]:
 
In [ ]:
 
In [ ]: